5 ms·
Everything I know of bash I learned from Freenode irc #bash channel who have a very active bot that always points to this wiki, so many scripts at work I see th
by joshbaptiste 11y ago
Everything I know of bash I learned from Freenode irc #bash channel who have a very active bot that always points to this wiki, so many scripts at work I see the dreaded
for i in `ls`; do...
Which only works due to the fact that we hardly have any files with spaces, newlines etc..
- frou_dh 11y agoThere should be a modern filesystem that's catered to nerd tastes and simply prohibits whitespace in file names.
- hyperpape 11y agoWhitespace really might be a bridge too far, but more modest restrictions have been proposed: http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html http://www.dwheeler.com/essays/fixing-unix-linux-filenames.h...
- JoshTriplett 11y agoAlternatively, allow everything in filenames, including whitespace and '/', but escape them on the filesystem using something like URL escaping (%20, %2F). No reason the filesystem names have to match the user-friendly names precisely, as long as a lossless bidirectional conversion exists.
- frou_dh 11y agoNeat idea. If I understand correctly, it'd still be fair to say that those characters wouldn't be allowed in file names since encoding/decoding the friendly form would be opt-in work each and every userspace program couldn't be relied upon doing?
- mitchty 11y agoYep, the vfs layer in most unixes won't let you use / or \0 in a filename. And for good reasons.