The man page for ascii(7) helps.
While it doesn't list the combinations such as ^@
and ^J
, it lists @
and the uppercase letters, then [
, \
, ]
, ^
and _
, on the right column, aligned with the control symbols on the left column.
The former (@
, uppercase letters and the other 5 symbols) have ASCII codes 0x40
through 0x5f
, while the control characters have ASCII codes 0x00
through 0x1f
. The Control key masks bit 0x40
, so the end result of using it with those letters on the right is the corresponding control character on the left.
(The Control key also masks bit 0x20
, which explains why lowercase characters, which are on the 0x60
through 0x7f
range also produce the same control characters. 0x40 | 0x20 = 0x60
so that's what gets masked.)
In specific, ^J
is NL, newline, also represented as "\n"
. It is the character used to indicate the end of a line in Unix file format.
\r
being shown as^J
, or maybe I'm not reading it correctly?^J
is actuallyLF
(line-feed), which C-style escapes represent as\n
. Similarly,^M
is actuallyCR
(carriage-return), which is often seen as\r
. So, 3 different notations. And it's easy to see by reading across two columns from J or M or @+64
over what the code is -- i.e., NUL is 0, but represented as 64 --> @ ?