global replacements with sed

Sam Vause vause at cs-col.Columbia.NCR.COM
Sat Aug 12 13:29:57 AEST 1989


In article <7630 at cbmvax.UUCP> grr at cbmvax.UUCP (George Robbins) writes:
>In article <49 at docwrk.UUCP> srh at docwrk.UUCP (Steven R. Houser) writes:
>> I'm trying to use the sed editor to make global relacements, but I'm not
>> having much luck.  I tried RTFM, but it doesn't give an example of what the
>> script file should look like.  What I'm trying to do is replace occurrences 
>> of ^L with .bp macros.
>> 
>> When I use the a script file containing:
>sed -e '/^L/s//.bp/' should work, assuming it's a real control/l and not
>some kind of caret followed by an L.

How about:  $ sed "s/^L/.bp/g" filename......


+------------------------------------------------------------------+
|Sam Vause, NCR Corporation, Customer Services - TOWER Support	   |
|3325 Platt Springs Road, West Columbia, SC 29169 (803) 791-6953   |
|                                vause at cs-col.Columbia.NCR.COM     |
|			 ...!uunet!ncrlnk!ncrcae!cs-col!vause	   |
|		...!ucbvax!sdcsvax!ncr-sd!ncrcae!cs-col!vause      |
+------------------------------------------------------------------+



More information about the Comp.unix.wizards mailing list