View the Control Characters in a file.


To find out the control characters in a file :

# cat -vet filename

-v       Non-printing  characters  (with  the  exception  of tabs,  new-lines  and form-feeds) are printed visibly. ASCII control characters (octal 000 - 037) are
              printed  as  ^n, where n is the corresponding ASCII character in the range octal 100 - 137 (@, A, B, C,. . ., X, Y, Z, [, \, ], ^, and _); the DEL character
(octal 0177) is printed ^?. Other non-printable characters are printed as M-x, where x is the ASCII character specified by the low-order seven bits.

-e       A $ character will be printed at the  end  of  each line (prior to the new-line).

-t       Tabs will be printed as ^I's and  formfeeds  to  be printed as ^L's.

No comments: