Linux system, the use of ordinary text editor to view, some characters are not displayed, this need to use the Cat command to view, the following small series to introduce the next Linux use Cat command to view hidden characters, together to understand the next bar.
First, we create a simple text file that writes some special characters. Open the terminal and run the command:
printf ' testing121111testing141012more testing1211001300even more testing1211111112 ' "/tmp/testing.txt
Now open with a different editor software, the results will be different. Open with a simple cat will show:
$ cat/tmp/testing.txt
Testing
Testing
More testing
Even more testing
If you open it with nano or VIM, you will see:
Testing
Testing^l^h
More testing
^@^k^ @even More Testing
Now let's add some option parameters to the cat so that we can display special characters.
Use the CAT-T command to display the TAB key character ^i
Cat-t/tmp/testing.txt
Testing
^i^itesting
More testing
^i
Even more testing
^i^i^i
Use the CAT-E command to display end characters for line endings $
$ cat-e/tmp/testing.txt
testing$
Testing
$
More testing$
Even more testing$
$
With a simple cat-a command, you can display all the characters that are not visible:
$ cat-a/tmp/testing.txt
testing$
^i^itesting^l^h$
More testing$
More testing$
^i^i^i$