last day (14 days later) » 

03:47
18
Q: Why do two colons in bash result in three?

NerdOfLinuxI know this sounds confusing, but: If I type :: into a bash shell, I get: -bash: ::: command not found But, only one : results in no output. Why is this?

what are you trying to accomplish in the bash shell .. why would you type :: and expect an output .. what is the actual code you are using .. it may need something in the code to make it look at : as a character
I just wondered what it would do. It's not a script, I just typed two colons into a bash session
ahh yeah .. it may be looking at it as code and may have issues with the colon just entered separately .. if you did `echo ":" it will just put one down .. its all depending on how you are using it
the added : may be in the error itself like if I type cd ow .. it comes back bash: cd: ow: No such file or directory note the colon after ow which wasn't typed ..its part of the error message
Put that as an aswer, and I'll mark it as solved
Luc
Luc
Have you tried anything to solve this grand mystery yourself?
03:47
"This question does not show any research effort".
after I got the answer, I realized how dumb the question was. I did try to use one colon, that was my very poor testing :)
Is it a serious question?
@HolaSoyEduFelizNavidad Well, question may not be a serious one at the surface level, but it's definitely thought provoking and there's a lot that can be taken into consideration. See my answer, for instance.
@NerdOfLinux Not a dumb question at all, if you look below the surface :)
Type in any arbitrary string that is not a command. What do you get?
The title does not match the question. The title sounds like you're asking why the error message has 3 :'s, when your typed command is 2 :'s. But your question is instead asking something completely different.
03:47
@Patrick Agreed, title doesn't match. That was edited by another user a few hours ago, I'll revert the edit
@Patrick the original title is worse in that respect. 2 colons where? 3 colons where? I clarified the "where" part.
@SergiyKolodyazhnyy This title doesn't match the question either.
@Olorin But at least it describes the issue :/ Let's just leave it as is
@SergiyKolodyazhnyy I don't see how this describes the issue any better than my edit did, unless you think "I don't understand what I'm seeing" is a good question title. I think your single-handed rollback of my edit is heavy-handed.
@Olorin Well, technically speaking OP didn't understand what they were seeing, so that could work :)
@SergiyKolodyazhnyy to clarify: you're saying "I don't understand what I'm seeing" is a good title?
03:47
@Olorin No, I'm trying to make a joke where people look at things way too seriously. Just let it be.
@SergiyKolodyazhnyy I'm sorry, but I cannot, in good conscience, just "let it be". I waited around for a day to see if anyone would clarify the title, but nobody did, so I tried my best. Only to see my efforts simply discarded by you after it was approved by others. If you can't improve things, don't stand in the way of those who do.
@Olorin Well, your original effort wasn't clear either, so it didn't improve it by much. Feel free to revert the edit. Personally, I'm done with this. And I think the title worked just fine, considering the amount of attention it gathered. Plus there's plenty of edit-capable people on the site, why then nobody changed it ? Maybe it was OK in original forma after all ?
@SergiyKolodyazhnyy of course it gathered a lot of attention - anybody who sees that title has to read the post to even figure out what and where these colons are. Classic clickbait. And it's funny that you say you're done with this and go on to ask more questions of me. And even if it didn't improve by much, it did clarify what and where these colons are (that's all my edit did). Why would you undo a clarification?
@Olorin To be fair, that's kinda how it works - title only introduces the issue briefly, details are meant to be part of question. No ? And OP's question asks about :: vs : behavior. Kinda like "If I do X, it doesn't do nothing, but if I do Y it does this". So I think either one doesn't work well. Let's come to compromise here - I'll edit the post again, post it on meta, and let the community decide whether edit is appropriate enough. Is that fair ?
0
Q: Does the title of this question capture OP's question well enough?

Sergiy KolodyazhnyyOK, so we have this HNQ, which gathered quite a lot of attention, snarky comments, and a small edit war between me and another user about the title of the question . I've edited the answer to match the body of the question. Issue is that it can be viewed from different points of view: is OP aski...


last day (14 days later) »