Just thought some of you would get a giggle out of this huge sprinkling can someone made for a yard decoration not too far from where I live. I estimated the can to be about
13 to 16 feet high. Someone has WAY too much time (and sheetmetal) on his hands.... :-) The link is:
formatting link
%20 is supposed to be a space in the above link. Ken.
Well ... to be a bit more accurate, unix or linux can handle it, the problem comes when trying to generate the filename on the command line (to look at it with other programs). You see, unix shells use spaces as one of the internal field separators (to separate multiple command-line arguments). The other two are the TAB character and the newline (end-of-line character). To get two words so separated accepted as a single argument, you have three choices:
1) Enclose the pair of words in double quotes '"'
2) Enclose the pair of words in single quotes "'"
3) Prefix the space (or other offending character) with a '' to tell the shell "Yes, I know that this is a special character which follows, but just for the moment, pretend that it is just a plain character."
The OS itself only prohibits two characters in filenames, the '/' which separates subdirectory names from filenames (and from each other), and the NULL character (binary value of zero) which is used internal to the OS kernel to terminate strings. This means that a newline can be included in filenames, which can be used to create havoc to certain automated scripts. :-)
Note that it is possible to make a minimal shell which treats fewer characters as special, but they are so useful that it is worth living with the inconvenience.
And some of the shells make it easier, such as tcsh (my preferred interactive shell) which has filename completion -- you type the beginning of the filename, and then hit a TAB, and it extends the filename out as far as it can (two which are different in only the last characters will let it extend out until the difference is reached, and then wait for you to type a character to un-confuse it. (It will also list the possible complete filenames to help you.) When it encounters a space, tab, or newline in a filename, it will prefix it with a ''. Normally, I use this only once, and rename the file to something more unix-friendly. :-)
And, of course, this is only important if I want to save the file for later re-examination.
So -- now that you now know more than you ever wanted to about unix behavior, I'll go back to reading the other articles. (I'm missing quite a few, because my ISP's news server has had serious problems, which will hopefully be fixed on Monday.)
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.