Minzhe
Minzhe

Reputation: 31

What does the symbol ^\ mean in linux

I got a file output from my perl script.

When I use less to open it less output it looks like this:

ABCDEFG^\HIJKLMN

When I use cat or head to open it head output it looks like this

ABCDEFGHIJKLMN

So I want to ask what is the ^\ symbol?

Upvotes: 2

Views: 1426

Answers (1)

that other guy
that other guy

Reputation: 123480

This representation is known as "caret notation" and is one notation used by some tools and editors to show undrawable control characters.

^\ in particular represents the ASCII file separator character, aka "FS" or 0x1C.

You can determine this manually by taking the ASCII value of the backslash (0x5C) and substracting 0x40, giving 0x1C. Should you want to input it in a terminal, you can press Ctrl+\.

This character is not used in any meaningful sense today. How it got into your perl script output is anyone's guess.

Upvotes: 2

Related Questions