Search code examples
linuxterminalspecial-charactersgnu-screen

how to display vertical tab in screen mode?


I have a file contain these text

abc\v\rdef

if i cat the file in shell mode, it presents like the following. it's correct.

abc
def

if i cat the file in screen mode, it presents like the following. it's wrong.

def

all commands i input was posted

$ cd /tmp
$ cat test.txt
abc
def
$ screen
$ cat test.txt
def

how to let vertical tab display correctly in screen mode?


Solution

  • You can use cat -v to display nonprinting characters. See man cat for details.

    Another option is to use tr:

    tr '\v' '\n' < test.txt