The unit separator ASCII character (ASCII 31, octal 37), is visible in Vim as a ^_
. But if I print the same file to the terminal, the character is invisible. This causes the fields on a line to get stuck together:
# In Vim and less:
first field^_second field^_last field
# cat the same file to terminal:
cat delim.txt
first fieldsecond fieldlast field
# print 2nd field with awk
cat delim.txt | awk 'BEGIN {FS = "\037"} {print $2}'
second field
I suppose I can make the unit separator visible with cat -v:
cat -v delim.txt
first field^_second field^_last field
But this is rather cumbersome. Why doesn't the unit separator have a visible representation when printed to stdout in the Bash shell? I can't even copy and paste the shell output correctly; the unit separator gets lost in the process.