Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
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