I’d add an ‘amen’ here. For those of us who use the Command Line less often this might seem like ‘dumb design’. But, spaces matter on the Command Line.
To expand for later readers who aren’t familiar with the Mac’s Unix Command Line…
A very simplistic analogy is that Tinderbox stores a list as one long string so needs the user (or you code) to insert semi-colons so the apps can process the string into a set of list items. In that context, the space in your command line code act as delimiters. In the CL this is normally how the computer separates the program called (which usually (always?) comes first) from input parameters. Consider this CL - exactly what it does isn’t important, just the layout of the code:
sort -k1,1 -k2,2 test.txt
Look for spaces and we see the
sort operator getting three discrete inputs:
-k2,2, and `test.txt’. So we run our test and need to try a new one for which we provide an a file ‘text 1.txt’. so, unthinking, we type in:
sort -k1,1 -k2,2 test 1.txt
Now the sort gets four discrete inputs:
test, and `1.txt’. Not our intention! We need to tell the CL that ‘test 1.txt’ is all one input, so:
sort -k1,1 -k2,2 'test 1.txt'
So if doing lots of CL work I tend to avoid that bu not using spaces in the names, e.g. :
sort -k1,1 -k2,2 test_1.txt
You could still use quotes there, if its it’s a quasi-rule you’ve learned:
sort -k1,1 -k2,2 `test_1.txt`
The quotes aren’t needed, but, whatever. For the same reasons, if making OS folders where I’ll be using full or partial OS paths (e.g. partial to sub-folders) I tend to use all lowercase
a-z0-9_ characters only. It saves lots of head-scratching.
Sorry, bit of a long answer, but coming to CL work via Tinderbox ‘just’ to do something in Tinderbox, I never got to sit in Unix 101 classes so the above sort of issues tripped me up. Plus no one tells you (until you screw up) as they fall in the “too obvious to warrant mention category” .
Oh, and CL experts feel free to correct me if the above is wrong. I do realise
"" quotes get treated slightly differently but I don’t think that nuance matters in this context.