How to make 'cat' in Linux to interpret control characters
The built-in echo
command interprets the common backslash escapes. But in a file you have to interpret, or convert it in a similar way. The sed
program can do this.
sed -e 's/\\r/\r/' < at.txt
But I learned somethere here, also. The external echo
command behaves differently from the internal one.
/bin/echo "\r"
Has different output than
echo "\r"
But basically you need a filter to convert the litteral \r
string to a single byte 0x0D.