Thursday, May 5, 2011

Don't Abuse the Cat!

I'm a UNIX geek. The first UNIX-based system I interacted with was in 1989 in the second half of my freshman year at Penn State. I've had them as hobby systems for pretty much the entire time since college. I've also worked with them, in a professional capacity since the mid-90s. So, I've got a bit of experience with using them.

With that much time using UNIX systems, I've developed some habits and something bordering on beliefs about how to use them. When people do things that violate those habits or "beliefs", it kinda hits a nerve. One of the biggest (irrational) annoyances is when people fire up two commands to accomplish what could be done with one. The biggest annoyance in this family of annoyances is piping the output of cat to another program that can read the file directly. The most common of these seems to be the infamous `cat ${file} | grep ${PATTERN}`. The one that probably annoys me the most, however, is `cat ${file} | more`.

Whut. The. Fuck. Seriously? Did you just type that? Worse: did I actually see you write in an operations guide to use that as a standard procedure? FUUUUUUUUUUUUUUUUUUUUUUUCK

Seriously: I die a bit, inside, every time I witness someone write/say "cat file | grep TERM" (or similar). There's been more than a few SA's (team members, customers, etc.) that have heard me bellow, "don't abuse the cat!"

No comments:

Post a Comment