-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =pod Internet memes are pretty popular these days, but they have always been around and they have always been irritating. One of the oldest Internet memes goes like this: From: Some Person Subject: Re: some problem that can be solved with a shell script Hi, I use this command: $ cat foo | perl -ne 'blah' Then, a minute later, a reply: From: Ai Knowitall Subject: USELESS USE OF CAT!!11!! > $ cat foo | perl -ne 'blah' This is a useless use of cat, you idiot. You are so dumb! What an idiot you are! Have I made it clear that you are stupid? Why are you invoking "cat" when you could just write: $ perl -ne 'blah' < foo Think of all the memory you are wasting, retardo! Would you write: $ cat foo | cat | cat | cat | cat | cat | perl -ne 'blah' No!!11! Fap fap fap! I am not exaggerating -- search your favorite mailing list archive for C and you will see this come up all the time. Here is a L. (Incidentally, this is apparently a movement pioneered by Randal Schwartz. Small world.) Anyway, this kind of response is annoying. C is not that heavy of a utility, and it gets the job done. I often prefer to use cat, because it makes for a more readable command line. If you write: $ bar < foo | baz | quux > canned-air It is hard to see the flow of the data. It's not C left-to-right. This is a little better: $ < foo bar | baz | quux > canned-air It's still pretty ugly. If you "uselessly" use cat, though, everything is clear: $ cat foo | bar | baz | quux > canned-air The data flows from the left and ends up on the right. I think it's worth wasting the 4 bytes of memory that C uses for this readability improvement. It's certainly not worth whining about on a mailing list, that's for sure. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkjsEA4ACgkQ2rw+dVvzZm2qKQCgpOTeTREzoHDkxE0jdOwMljl9 8pYAn0FKfylJEqzMQM9tC3tYPLn9s60V =tK4k -----END PGP SIGNATURE-----