0
When reading a Windows log file in a Linux terminal, I see a strange symbol “001E”
How can I replace it by space? Maybe something like sed -e 's/010e/ /'
0
When reading a Windows log file in a Linux terminal, I see a strange symbol “001E”
How can I replace it by space? Maybe something like sed -e 's/010e/ /'
1
If you see these four hexadecimal digits in a box, it means your terminal's font does not cover that character. The hexadecimal notation tells you which character it is: U+001E, which is in the control character range — 1E is ^^
(i.e. Ctrl-^
).
If you want to replace it with a space, you can use
sed -e 's/\x1E/ /g' <input-file >output-file
or
tr '\036' <input-file >output-file
(tr
only accepts octal).
0
To replace LATIN CAPITAL LETTER D WITH CARON, do this:
$ sed 's/Ď/ /g'
0
Using this answer as a reference:
CHARS=$(python -c 'print u"\u001E".encode("utf8")')
sed 's/['"$CHARS"']//g' < /tmp/utf8_input.txt > /tmp/ascii_output.txt
I am not sure what is your character though... The screenshot suggests it is 0x001e but you have mentioned 0x010e. Whichever it is, you can just change the script above as needed.
What encoding does your terminal use? – choroba – 2012-09-10T13:59:04.377