want to see this. Desperately.
yep, same guy who made Helvetica. Go figure.
For this I blame my friend and cow-orker b., who is taking a break from graphic design for a little while to go collect his sweet baby boy from Korea.
yep, same guy who made Helvetica. Go figure.
For this I blame my friend and cow-orker b., who is taking a break from graphic design for a little while to go collect his sweet baby boy from Korea.

$ cat print this line of textThe command line is "standard input." The line that prints out to the shell is "standard output."
print this line of text
DEADJOEYou could go into an editor like joe or pico and open each file individually--kind of the way you have to do with most GUI word processing/text editing applications. Or you could do it much more quickly with cat:
a*
a.sh*
a~*
b*
b.sh*
b~*
c*
c.sh*
cat.txt
cat.txt~
cattemp
c~*
dogs
dogs~
glupr
glurp
soopersekrit
$ cat soopersekritThat's all! I think I was trying out the joe editor with this file. Nothing to see here. But this could be really important later--say, what if you're investigating an intrusion incident and you're going through a huge number of files and directories to see if there's a nasty little rootkit script hidden away there somewhere? That can speed things up tremendously, although the security engineers I know probably use scripts that automate that process. For longer files you want to use | (pipe) and the more filter.
ok, here's a soopersekrit file that I'm going to copy.
seems pretty intuitive.
C-x-s saves.
$ cat jeoffrey | moreThis will show you a page of a file at a time--like the one above, "For I will consider my cat Jeoffry," a long, affectionate paean from harmless 18th-century religious lunatic Christopher Smart to his feline companion. (I like to use it for playing with long files, because it's a charming poem, and because it seems appropriate to use with cat.) Just press the spacebar to proceed.
$ cat fun_with_cat > fun_with_cat_backupAlways be very careful with this command, though, because if you try to redirect output into an existing file, it will replace any content in that file. To safeguard against this, you can enable a feature called noclobber, which displays an error message and won't permit the command to be executed.
$cat > notes_on_catWhen you're done, control-d saves and exits the file. But as with redirecting output, be careful that if you return to the same file that you don't end up overwriting what you've previously stored there. To pick up where you left off, use the append output symbol (>>):
Things I can do with cat:
1. Preview files quickly.
2. Redirect the output from one file into another. (careful!)
3. Use cat as an editor.
$ cat >> notes_on_catCat does have limitations as an editor, though--you can't go back and edit text, and you can only delete the line you're working on. So while I first attempted to draft this entry entirely in cat, I found it a wee bit impractical. But for taking notes while playing around with the Linux shell, it's incredibly useful. There are lots of other things you can do with cat involving pipes and tees and filters, but these are the three I've found most helpful lately. I'm hoping to add more of the useful things I've gleaned from my classes here--it actually provides something of a review for me and keeps me in shape as a technical communicator.
OK, what was I saying? Cat is a very useful command.
