sed search and replace
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix True 64 > sed search and replace




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    sed search and replace  
charles.bowers@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-14-07 06:20 PM

I'm trying to use a tag in sed, so I can tag part of the line and
replace other parts as show below.
Do you know what I'm doing wrong?


sed 's/\nuserPrincipalName.+\n)/\nuserPrincipalName:\1uid:\1/g'
OUTPUT-ba.txt > output.txt


output-ba.txt
userPrincipalName: Joe Mama
userPrincipalName: Yo Mama

output.txt
userPrincipalName: Joe Mama
uid: Joe Mama
userPrincipalName: Yo Mama
uid: Yo Mama






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:44 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register