Operating System - Linux
1753886 Members
7391 Online
108809 Solutions
New Discussion юеВ

Re: how to remove backspace

 
SOLVED
Go to solution
Maaz
Valued Contributor

how to remove backspace

in a file name "file.txt" I want to insert a back slash ('\') before the space

# cat file.txt
/data/Ora db/backup server db1
/data/Sybase db/backup server db2

I open the "file.txt" in vi
then
:%s/ /\ /g

but it doesn't work

I even tried the following, without success
cat file.txt | sed 's/ /\ /g' > test.txt

please help
2 REPLIES 2
Vitaly Karasik_1
Honored Contributor
Solution

Re: how to remove backspace

You should use "\\" instead of "\" in both cases in order to mask "\".
Maaz
Valued Contributor

Re: how to remove backspace

thanks for CCC(cool, crunchy, crispy) help ;-)

Regards
Maaz