Skip to main content

Mastering cat 

A fictitious (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: Hell 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.
Mastering cat by ivantis May 17, 2009
Urban Dictionary Merch
Your favorite words on things you can wear, drink from, read, or give to a friend.
The Urban Dictionary Store sells gifts you’ll have to explain.
More from Urban Dictionary

Sandwich Generation 

Those Baby Boomers sandwiched between the need to care for their dependent children and the responsibility of caring for their older parents. As noted by social researcher Mark McCrindle (www.mccrindle.com.au), this sandwich generation arises from the combined trends of delayed childbirth, the delayed financial independence of children, and the increasing life expectancy of the older generation.
"Still caring for kids and have your parents living with you? That would make you and your husband members of the Sandwich Generation."
Sandwich Generation by Wolfwoman September 12, 2009
Word of the Day on November 16, 2026

doorwall 

A door wall is a sliding-glass door or patio door. The term is yet another example of banal Michigan vernacular, where in the residents latch on to company names, trademark names, marketing terms and product names from local companies. The terms become embedded in the local vocabulary and eventually become accepted as actual valid words and phrases. In this case the term comes from Wallside Windows in Taylor, MI (a large window manufacturer), where 'door wall' is their created word for sliding-glass door.
"Bob! John's gonna bring over them doorwalls from Wallsides on Tuesdee afternoon 'round two-thirty. Get 'er done!"
doorwall by MaxSeven October 26, 2011
Word of the Day on November 15, 2026
Internet gaming term used for people who are insanely good at something.
Teammate wipes out the entire enemy team.
You: Holy shit, he's fucking cracked!
Cracked by Hwangje Hien April 22, 2020
Word of the Day on November 14, 2026
Millennial optimism may be gone, but Gen Z whimsy (WhimZ) is in.
WhimZ by WhimZ! November 5, 2026
Word of the Day on November 13, 2026

Frothability 

The measure of an emotional and over zealous consumer in an upwardly charging market, also known as a bull market. It's characterized by rising asset prices, increased investor confidence, and favorable growth in the markets, bro.
The frothability was evident as over-zealous consumers eagerly engaged in bidding wars, driving property prices to unsustainable levels reminiscent of previous speculative bubbles.
Frothability by cptn.kagaroo1 January 26, 2024
Word of the Day on November 12, 2026

Soul digger

A man who dates women with the sole purpose of exploiting their time, energy, and labor while he sucks the joy and happiness from their lives.
"That guy's a soul digger. He'll expect you to work full time, but you'll be doing all the cooking, cleaning, laundry, shopping, and childcare while he plays video games or watches TV."
Soul digger by anonymous November 11, 2026
Word of the Day on November 11, 2026
Load more