sys cat¶
vb sys cat [OPTIONS] [FILE] ...
Description¶
Concatenate FILE(s) to standard output. If no FILE is given or FILE
is -, read standard input.
Options¶
- -A¶
Show all (equivalent to -vET)
- -b¶
Number nonempty output lines
- -e¶
Equivalent to -vE
- -E¶
Display $ at end of each line
- -n¶
Number all output lines
- -s¶
Squeeze multiple adjacent blank lines
- -t¶
Equivalent to -vT
- -T¶
Display TAB characters as ^I
- -u¶
Ignored (for compatibility)
- -v¶
Use ^ and M- notation, except for LF and TAB
Examples¶
View File Contents: Displays the contents of the file alpha.txt.
$ vb sys echo "This is test contents of alpha.txt" > alpha.txt
$ vb sys cat alpha.txt
This is test contents of alpha.txt
Display the contents of multiple files: Displays the contents of alpha.txt and beta.txt at the same time.
$ vb sys echo "This is test contents of beta.txt" > beta.txt
$ vb sys cat beta.txt alpha.txt
This is test contents of beta.txt
This is test contents of alpha.txt
Connection file: Merge the contents of alpha.txt and beta.txt into gamma.txt.
$ vb sys cat alpha.txt beta.txt > gamma.txt
$ vb sys cat gamma.txt
This is test contents of alpha.txt
This is test contents of beta.txt
Display line numbers with the -n option: Displays the contents of the file gamma.txt and prefaces each line with a line number.
$ vb sys cat gamma.txt -n
1 This is test contents of alpha.txt
2 This is test contents of beta.txt
Display line terminator with -e option: Displays the contents of the file delta.txt and ends the line with $
$ vb sys echo -e "This is test contents of delta.txt\nSecond lin\nThird line" > delta.txt
$ vb sys cat delta.txt -e
This is test contents of delta.txt$
Second lin$
Third line$
Show tabs with the -t option: Displays the contents of the file epsilon.txt and uses ^ I for tabs.
$ vb sys echo -e "\ttable This is test contents of epsilon.txt" > epsilon.txt
$ vb sys cat epsilon.txt -t
^Itable This is test contents of epsilon.txt
Merge blank lines with -s option: Displays the contents of the file zeta.txt and merges consecutive blank lines.
$ vb sys echo -e "This is test contents of zeta.txt\n\n\n\n\nThis is test contents of zeta.txt\n\n\n\n\nThis is test contents of zeta.txt" > zeta.txt
$ vb sys cat zeta.txt -s
This is test contents of zeta.txt
This is test contents of zeta.txt
This is test contents of zeta.txt