3 ms·
This is generally not true. Most unix utilities handle filenames with spaces just fine. It's mostly at the shell where people get mixed up about quoting spaces
by dgacmu 3y ago
This is generally not true. Most unix utilities handle filenames with spaces just fine. It's mostly at the shell where people get mixed up about quoting spaces - so while it _appears_ that the problem is with the utility, it's really just the shell assuming that space is an argument separator.
- xp84 3y agoIt sounds like perhaps in the 1980s though, this may have been less true?
- dgacmu 3y agoCould be. I'm definitely a 90s-and-later unix kid. I wonder when -0 was added to `find` Edit: The quote is actually from the Unix haters handbook, published in 1994. I don't remember too many horrors with spaces in filenames from back then, but, er, it's been a while. find | xargs was a known problem case but that's why it got -0. Most of the rest was the familiar horrors of shell scripting.
- kps 3y agoIt was equally true if you exclude things that couldn't work, like `xargs` without `-0`, but people were less careful about quoting. `shellcheck` didn't exist until 2012 (going by its copyright notice).