3 ms·
God help you if your paths have spaces in them.
by 6gvONxR4sf7o 6y ago
God help you if your paths have spaces in them.
- gorgoiler 6y agoBy “God” you may mean “libc”... ...if it was the 1970s. Nowadays we use Python etc for tools where it’s less acceptable for them to fall apart, though everything falls apart at some point, spaces or otherwise.
- anthk 6y agoThat's Perl role, not Python. You are like 20 years late, kid. Have fun with that shitty whitespace syntax. At least Perl can be refactorized.
- bananabreakfast 6y agoDon't you mean Raku? lol
- naniwaduni 6y agoPerl 5 was more suitable for these particular use cases than perl 6 ever tried to be.
- anthk 6y agoPerl5 was and is amazing. Check the articles from https://linuxfocus.com https://linuxfocus.com and the old Linux Gazzete magazines from TLDP: https://linuxgazette.net/archives.html https://linuxgazette.net/archives.html.
- bityard 6y agoJust quote paths? shrug
- mehrdadn 6y agoTry doing that in e.g. Make
- fao_ 6y agoTry finding out which registry key you need to edit to get something to happen. Some things across different systems have pitfalls as a result of their implementation, or some features have pitfalls. There are half a dozen things I can point to on windows that are worse than the "spaces in filenames". Hell, windows doesn't even support ISO 8601 dates, or times to be properly placed in files. It restricts symbols much more than Linux / Unix
- yzmtf2008 6y agowho said anything about windows?
- fao_ 6y agoThe parent thread referenced windows as something that handles spaces in filenames. I'm not sure why I'm getting downvoted when my comment was relevant to the debate occurring, and my point (that all features have downfalls caused by the necessity of implementation within the surrounding system, and in the case of command line arguments, linguistics and common keyboards themselves) is something that according to the guidelines should be debated against, not downvoted.
- yzmtf2008 6y agoNone of the parents of your comment mentioned Windows. Perhaps you have the wrong thread?
- blacksqr 6y agoIn the early 2k's I discovered that it was impossible to quote or escape spaces in filepaths in a makefile. I naively reported it to the Make maintainer as a bug. The maintainer responded by saying, basically, that the behavior was deeply baked in and was not going to change.
- deleted 6y ago[deleted]
- mfontani 6y agoNo need to invoke a deity to do that... echo 'Hi!' | tee "$(printf "foo\nbar\tqu ux.txt")" cat foo$'\n'bar$'\t'qu' 'ux.txt IIRC the latter only works in ksh93+, but the former should be fine pretty much in any shell.
- JdeBP 6y ago... except if one uses \c by mistake. \c has unspecified behaviour, and is one of the things that varies widely from one implementation of printf to another. * https://unix.stackexchange.com/a/558665/5132 https://unix.stackexchange.com/a/558665/5132