shell - 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?

1 Answer

  1. George- Reply


    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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>