Hacker News new | ask | show | jobs
by andrerobot 5779 days 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.

1 comments

Randal 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%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.

In those same modern shells, "echo" and "<<<" are both built-in, but "cat" is not.