Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!gatech!hubcap!ncrcae!cs-col!vause From: vause@cs-col.Columbia.NCR.COM (Sam Vause) Newsgroups: comp.unix.wizards Subject: Re: global replacements with sed Message-ID: <265@cs-col.Columbia.NCR.COM> Date: 12 Aug 89 03:29:57 GMT References: <49@docwrk.UUCP> <7630@cbmvax.UUCP> Reply-To: vause@cs-col.Columbia.NCR.COM (Sam Vause) Distribution: usa Organization: NCR Customer Services Support Team, Columbia, SC Lines: 21 In article <7630@cbmvax.UUCP> grr@cbmvax.UUCP (George Robbins) writes: >In article <49@docwrk.UUCP> srh@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@cs-col.Columbia.NCR.COM | | ...!uunet!ncrlnk!ncrcae!cs-col!vause | | ...!ucbvax!sdcsvax!ncr-sd!ncrcae!cs-col!vause | +------------------------------------------------------------------+