home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!uknet!axion!muppet!qdos!mick
- From: mick@muppet.bt.co.uk (Mick Burnell)
- Newsgroups: comp.unix.shell
- Subject: Re: Another sed question.
- Message-ID: <1993Jan28.092332.23686@muppet.bt.co.uk>
- Date: 28 Jan 93 09:23:32 GMT
- References: <1993Jan27.204753.23339@nmsu.edu>
- Sender: news@muppet.bt.co.uk
- Reply-To: mick@muppet.bt.co.uk
- Organization: British Telecom
- Lines: 20
-
- In article 23339@nmsu.edu, jsz@scf.nmsu.edu (Henri De Valois) writes:
- >
- > I am trying to write a script,that would append to each EOL
- > some string,say `blah'. but when I do "sed -e 's/^/blah/g' inputfile > outputfile"
- > `blah' inserts at the begining of each line.
- >
-
-
- Try sed -e 's/$/blah/g'
-
-
- ^ As the leftmost character, a caret (or circumflex) con-
- strains the RE to match the leftmost portion of a line.
-
- $ As the rightmost character, a dollar sign constrains
- the RE to match the rightmost portion of a line.
-
-
- Hope this helps,
- Mick.
-