Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: charles.bowers@gmail.com
Subject: sed search and replace
Date: Tue, 14 Aug 2007 17:21:28 -0000	[thread overview]
Message-ID: <1187112088.131849.163100@22g2000hsm.googlegroups.com> (raw)

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



                 reply	other threads:[~2007-08-14 17:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox