I am new to unix and writing script to extract data in delimited file format.
want to use ^A as delimiter , can you please suggest how to type/insert it
I am new to unix and writing script to extract data in delimited file format.
want to use ^A as delimiter , can you please suggest how to type/insert it
I think the answer is '\001', but I'm not a very experienced shell scripter.
Here is a link that helped:
http://docstore.mik.ua/orelly/unix/upt/ch45_35.htm
Type Ctrl + V, then Ctrl + A.
According to your system configuration, you may need to type other key sequence. Check the output of
stty -a
, especiallylnext
:In
vi
, you can generally type CTRL-V in insert mode, followed by another control character.That's also true in the
bash
shell if you're invi
editing mode (entered with CTRL-K).In
emacs
editing mode (usually entered by using the up arrow key), you would use CTRL-Q as a prefix command, before entering the character you want.For example, here's my shell session showing the use of CTRL-VCTRL-A (which shows up as
^A
):You can see that the octal dump of the single character is indeed CTRL-A, or
001
.You can type
:h digraph-table
to see the digraph-table text that describes the character. Then you can input Ctrl + K and the digraph line consponsed to your character.