cancel
Showing results for 
Search instead for 
Did you mean: 

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
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