3 ms·
Unix scripting always amazes me. Every time I read a script or a blog post about it I learn something new. After all these years using Linux, I don't remember
by andrerobot 16y ago
Unix scripting always amazes me. Every time I read a script or a blog post about it I learn something new.
After all these years using Linux, I don't remember ever noticing input redirection.
- guns 16y agoRandal Schwartz used to give out the "Useless use of `cat' award" to annoyed posters in comp.unix.shell because of the relative obscurity of the `<' operator. http://groups.google.com/groups?q=Useless%20Use%20of%20Cat%20Award http://groups.google.com/groups?q=Useless%20Use%20of%20Cat%2... (actually his main point was that most unix commands take a file as an arguments, but for the ones that don't you can just slurp it into stdin with `<') Nowadays, we could say the same thing about useless uses of `echo', given the modern `<<<' operator.
- klodolph 16y agoIn those same modern shells, "echo" and "<<<" are both built-in, but "cat" is not.