If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > how replace "\\" using sed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-06-04, 05:38
wrcastro_ph wrcastro_ph is offline
Registered User
 
Join Date: Oct 2003
Posts: 5
how replace "\\" using sed

Hi,

I need your help.

I have a file that contains ...... \\xxxxx..... how can I replace the double backslash, because I'm having a problem replacing those by using sed command.


sample file :

xxxxxxxx
xxxxxxxx
xxxxxxxx \\NNNNN
\\NNNNN xxxxxxxxx
xxxxxxxxx


Please help me solve my problem.
Reply With Quote
  #2 (permalink)  
Old 05-06-04, 07:54
TimoV TimoV is offline
Registered User
 
Join Date: Dec 2003
Posts: 56
You need to put a \ in front of the \ you want to change...so you'd get something like:

sed s/\\\\/fasfddsa/

where fasddsa is what you want the \\ to become...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On