February 2001
Beginner to intermediate
448 pages
9h 2m
English
Official Description
Concatenates or displays files.
Syntax
cat [-benstvA] file... | -
Options
-A shows all.
-b numbers nonblank output lines.
-e shows $ at the end of lines.
-n numbers all output lines.
-s means squeeze-blank; never more than one single blank line.
-t shows tabs as ^I.
-v shows characters that typically do not print.
With no file, or when file is -, it reads standard input.
Oddities
Used to create small files (cat > xx).
Example
$ cat -n buzz # Numbers the output lines 1 #! /bin/ksh 2 integer x=17 3 while : 4 do 5 x=17 6 done $ $ cat > small # Create small file junk more junk # Ctrl+D to end the input (at beginning of next line) $ $ cat small junk more junk $ $ cat -e small # Indicate line ends with $ junk$ more junk$ ...
Read now
Unlock full access