Search code examples
bashasciicat

Bash. cat file interpret text as usual, but cat -t text find some symvals (^A) etc


What is that symbol meaning? cat text.txt


str          !

()
   ()  
()
         end.

cat -t text.txt


str          !

(^A)
   (^B)  
(^F)
^I end.

what that symbol meaning? Why does it view with flag t?


Solution

  • what that symbol meaning?

    From https://en.wikipedia.org/wiki/Caret_notation :

    Caret notation is a notation for control characters in ASCII. The notation assigns ^A to control-code 1, sequentially through the alphabet to ^Z assigned to control-code 26 (0x1A). For the control-codes outside of the range 1–26, the notation extends to the adjacent, non-alphabetic ASCII characters.

    ^A means byte 0x01, ^B means byte 0x02, etc.