3 ms·
What about using the filename in arrays in bash/sh?
by XCSme 9mo ago
What about using the filename in arrays in bash/sh?
- layer8 9mo agoBut Bash arrays don’t use comma, what’s the problem?
- pmarreck 9mo agoHave you met Bash? It’s a shrine to space-delimited everything lol
- layer8 9mo agoI reworded my comment for clarity now.
- XCSme 9mo agoOh, 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 file,.txt file,,.txt file,,,.txt
- XCSme 9mo agoImagine seeing this code: echo file{",",",,",",,,"}.txt
- mathfailure 9mo agoAh, I see you're a man of culture as well!