Mastering cat


a fict-tious (literally, it’s not a real book) book about mastering the unix/linux ‘cat’ command. “written” by shlomi fish, the acclaimed author of ‘mastering rm’, and ‘mastering mv’.
o’reilly net: hi shlomi!

shlomi fish: hi!

o’reilly net: so, what has motivated you to write the book?

shlomi fish: well, i realised people use cat so often that they don’t take the time to fully investigate it and learn it. for example, many people i worked with believed that cat can only be used to output one file at a time. so to output several files they used something like:

(cat file1.txt ; cat file2.txt ; cat file3.txt) | command

the horror! cat accepts several files as arguments. so you can write it as:

cat file1.txt file2.txt file3.txt | command

this has motivated me to write the book, to make people fully understand the command.

o’reilly net: isn’t mastering cat supposed to be quite easy? does it really necessitates its own book?

shlomi fish: h-ll no! mastering cat is not easy at all. in fact, mastering cat is almost as difficult as herding cats.

for example, one case where i found that people truly underestimate the power of cat is in the prefixing a line example. you can do that with:

echo “this would be the first line” | cat – myfile.txt > myfile.txt.new
mv -f myfile.txt.new myfile.txt

but people do not realize that and instead opted to use sed, awk, or even perl (!). it can be taken further, of course. if the prefix is already in its own file, you can simply use cat prefix.txt myfile.txt

of course, if you want to append the same text to both the start and the end of a file, you can’t do that with cat – myfile.txt -. it simply doesn’t work that way. so, i end up explaining a lot about unix pipeline concepts in the book.

o’reilly net: so what else does your book cover?

well, i cover many things there. among them are:

1. history of the cat command.

2. differences between the various cat implementations. (gnu, the bsds, system v, etc.)

3. cat equivalents in other operating systems (dos, win32, vms, os/390, etc.)

4. overview of the gnu cat codebase (for programmers).

i’m also focusing on the various cat flags, which aid in its interactive use. for example the -e/–show-ends flag, that places dollar signs at the end of the lines.

except for that i’m also covering dog which is a program that provides a superset of the cat program. i should also mention mouse which aimed to provide an even greater superset, and was never released. rumors say some parts of it are based on code of the leaked windows 2000 sources.

o’reilly net: your book seems bound to be popular. (for some values of popularity) what can we expect from you next?

shlomi fish: well, i hope many people will buy the book, or read it online so they’ll be educated about cat. if you like “mastering cat”, look forward to my next book – “mastering echo”. i expect it to be published next fall.

Read Also:

  • MCJ

    mighty c-ck jockey ie tramp, hussey. harlot she/he was known all around town as one mcj mighty c-ck jockey ie tramp, hussey. harlot she/he was known all around town as one mcj

  • poon hoover

    the action of sucking on a womans cl-toris ie, giving someone a poon hoover, or poon hoovering them. the experience is found to be very pleasurable among females. “oh my god i like totally gave jane porter a poon hoover last night and she came all over my face!” “duuuude”

  • Poonin' For A Ride

    when a chick texts pics of her sn-tch to a guy she doesn’t even know, hoping to “get” him by appealing to his typical, brainless, male-dog nature. she lures him in with that promise of free and easy p-ssy, and he totally regrets banging her later when he comes to his senses and realizes that […]

  • Poonjin'

    to dip your meatstick in to a sauce, preferably poonjuice…unless you have a food fetish. can be used as a noun or a verb. nouni got me some poonjin last night! verbyou gonna be poonjin tonight???

  • poon stamp

    stamping a male on the chest with a menstruating v-g-n- as a sign of ownership. my girlfriend poon stamped me last night. similar as stampoon that was poonstamp !


Disclaimer: Mastering cat definition / meaning should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. All content on this website is for informational purposes only.