How to escape the escape character in bash?
Well, you should be able to use this command:
rm $'\033\033'
More info on how $'...'
works can be found here.
Note that ls
might display a file named $'\033\033'
as ''$'\033\033'
. Doesn't matter much though, rm ''$'\033\033'
would also work fine as the two leading single quotes just form an empty string.
How to remove escape char from string in bash using sed?
try this:
.......|sed 's@\\@@g'
or:
.......|sed "s@\\\\@@g"
EDIT add a test output:
kent$ echo "http:\/\/stackoverflow.com\/questions\/ask"|sed "s@\\\\@@g"
http://stackoverflow.com/questions/ask
kent$ echo "http:\/\/stackoverflow.com\/questions\/ask"|sed 's@\\@@g'
http://stackoverflow.com/questions/ask
How to remove terminal control escape sequences in the file?
I solved this issue using lots of regular expressions according to http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
Related Topics
How to Shutdown a Spring Boot Application in a Correct Way
Uninstall Node.Js Using Linux Command Line
Is There a Way For Non-Root Processes to Bind to "Privileged" Ports on Linux
Use Expect in a Bash Script to Provide a Password to an Ssh Command
Using Openssl to Get the Certificate from a Server
How to Install Gcc 4.9.2 on Rhel 7.4
How to Install Latest Version of Git on Centos 8.X/7.X/6.X
How Are the Fs/Gs Registers Used in Linux Amd64
Use of Floating Point in the Linux Kernel
How to Create Docker Overlay Network Between Multi Hosts
Return Value of Sed For No Match
Edit Shell Script While It's Running
Connection Refused to Mongodb Errno 111
Linux Bash: Multiple Variable Assignment
How to Print a Character in Linux X86 Nasm
Encryption/Decryption Doesn't Work Well Between Two Different Openssl Versions