3
为什么在终端输出中看不到单位分隔符(ASCII 31)?
单位分隔符ASCII字符(ASCII 31,八进制37)在Vim中显示为^_。但是,如果我在终端上打印相同的文件,则该字符不可见。这会导致一行中的字段卡在一起: # 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 我想可以用cat -v使单元分隔符可见: cat -v delim.txt first field^_second field^_last …