Unix True 64 - sed search and replace

This is Interesting: Free IT Magazines  
Home > Archive > Unix True 64 > August 2007 > sed search and replace





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author sed search and replace
charles.bowers@gmail.com

2007-08-14, 1: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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com