Every tool and shell that lay in arm's reach treated the comma as a perfectly normal and unobjectionable character in a filename.
WTF. After 40 years maybe I should have figured that one out. Every tool and shell that lay in arm's reach treated the comma as a perfectly normal and unobjectionable character in a filename.
WTF. After 40 years maybe I should have figured that one out.
It's not a completely non special character: for instance in bash it's special inside braces in the syntax where "/{,usr/}bin" expands to "/bin /usr/bin". But the need to start that syntax with the open brace will remind you about the need to escape a literal comma there if you ever want one.
You may enjoy learning about the [ binary.
You never used CVS/RCS with its “,v” files?
Until someone forces you to use a file system that cannot tolerate commas...
Which file system would that be?
Many early file systems like the original FAT, RSX-11, VMS ODS-2 ... Probably not a concern for anything in the past 30 years.
What about using the filename in arrays in bash/sh?
But Bash arrays don’t use comma, what’s the problem?
Oh, that might be true, I do remember encountering some escaping issues when creating a more complex POSIX (or bash) script that involved lists and iterating through stuff.
I see Bash only uses commas in Brace expansions:
file{1,2,3}.txt # file1.txt file2.txt file3.txt
I guess it would only be a problem if you want to expand
Imagine seeing this code:
Ah, I see you're a man of culture as well!
Have you met Bash? It’s a shrine to space-delimited everything lol
I reworded my comment for clarity now.