How to type ^ A in a unix script / VI shell

I am new to unix and writing a script to extract data in delimited file format.

want to use ^ A as a delimiter, can you suggest how to type / paste it

+4
source share
4 answers

Enter Ctrl+ V, then Ctrl+ A.

Depending on your system configuration, you may need to enter a different key sequence. Check the output stty -a, especially lnext:

$ stty -a | grep lnext
lnext = ^V; flush = ^O; min = 1; time = 0;
^^^^^^^^^^
+4
source

In viyou can usually enter CTRL-Vin insert mode, and then another control character.

bash, vi ( CTRL-K).

emacs ( ), CTRL-Q , .

, , CTRL-V CTRL-A ( ^A):

pax> echo -n "^A" | od -b
0000000 001
0000001

, CTRL-A 001.

+4

:h digraph-table, , . Ctrl + K, .

0
source

Source: https://habr.com/ru/post/1569396/


All Articles