[Gllug] probs with sed

itsbruce at uklinux.net itsbruce at uklinux.net
Tue Jul 1 15:45:22 UTC 2003


On Tue, Jul 01, 2003 at 03:54:37PM +0100, ben f wrote:
>  --- Paul McCourt <paul at fiddlersglen.com> wrote: > 
> > Hi,
> 
> > I'm getting a little somewhere with sed e.g.
> > s/$/test/
> > puts it a the start but I can't work out how to put
> > it at the end!
> 
> You mean this puts it at the end but you can't put it
> at the start, right?
> 
> use: sed -e 's/^/test/' -e 's/$/test/'

sed 's/\(^\|$\)/test/g'

-- 
Bruce

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list