
On 17.07.14 20:22, Brett Pemberton wrote:
rm "windows 7" rm windows\ 7
Perfectly valid ways to deal with the POSIX-OK space in the filename.
I'm suggesting that this is fine. As compared to the other suggestions that the file should never have been named that, and should have been windows_7 instead.
True, they are alternatives, and banning spaces in filenames is a personal choice - admittedly one I've practiced (and inflicted on my software development teams) for several decades. Avoiding risks is preferable to fixing problems, even with simple workarounds, I find. And OK, the OP would even have been fine if he'd used filename completion, because the shell would have escaped the space for him. But manual and semi-manual methods do not pick up all cases, so I don't consider the risk worth running. Heck, in personal shellscripts I don't even bother with defensive quoting of arguments, because spaced filenames will never be passed to them. Erik (Whose beard is grey, so he's allowed to be old-fashioned.) -- "Those who live by the GUI, die by the GUI" - Duncan Roe, on luv-main ML.