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 > substitute each occurences of the text <<break>> in a file with CR/LF using sed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-25-06, 11:26
tlbettip tlbettip is offline
Registered User
 
Join Date: Aug 2006
Posts: 2
substitute each occurences of the text <<break>> in a file with CR/LF using sed

I'm trying to substitute each occurences of the text <<break>> in a file with CR/LF using sed.the syntax I used is similar to what is shown below.

#sed "s/<<break>>/^M//g" breakfile

but this does not do what I want instead it replaces the occurances of <<break>> with ^M.

Can someone help me in solving this out.

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 08-25-06, 12:26
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,456
Cool



Replace the ^M with ctrl-v, ctrl-m

That is: press the ctrl key and type vm

__________________
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
Reply With Quote
  #3 (permalink)  
Old 08-28-06, 05:04
tlbettip tlbettip is offline
Registered User
 
Join Date: Aug 2006
Posts: 2
Thanks a lot ,that works fine

Tlbettip
Reply With Quote
  #4 (permalink)  
Old 08-28-06, 10:01
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,456
Cool


Great! -- glad to help.
__________________
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
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