-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
The Ultimate Linux Shell Scripting Guide
By :
The cat utility has nothing to do with our feline friends. It’s used to either view, create, or join multiple text files together. (In fact, the term cat is short for catenate, which is a fancy way of saying “to join two things together, end-to-end”.)
I said in the introduction that Mac users can perform the demos in this chapter on their Macs. Now though, I have to add a bit of a caveat. That’s because there are at least three versions of cat, which all have different sets of option switches. I’ll point out the differences as we go along.
Sometimes, you’ll need to write scripts that are portable across various different operating systems. So, it’s important that you know about these little idiosyncrasies.
By default, stdin for cat is the keyboard, and stdout is the computer screen. If you just type cat at the command prompt, you’ll be able to type in text and make it echo back to you as soon...