Pages

Wednesday, December 16, 2015

cat command one liners

Home

Display content of a file
cat filename

Display content of a file with line numbers at start of each line
cat -n filename

Display content of a file with line numbers only at start of each non blank line
cat -n filename

Display content of a file with $ showing at end of each line
cat -E filename

Display content of a file by getting rid of consecutive blank lines
cat -s filename

Display content of a file by highlighting TAB as ^I
cat -T filename

Display content of a file by using all available options, Useful in tracking ascii, special and junk characters
cat -A filename

Display content of a file including junk characters
cat -ve filename

Back To Top
Home

No comments:

Post a Comment