home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / shell / 5500 < prev    next >
Encoding:
Text File  |  1993-01-27  |  969 b   |  29 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!ukma!gatech!purdue!mentor.cc.purdue.edu!sage.cc.purdue.edu!davisre
  3. From: davisre@sage.cc.purdue.edu (Robert Davis)
  4. Subject: Re: Another sed question.
  5. Message-ID: <C1J8Lu.EIr@mentor.cc.purdue.edu>
  6. Sender: news@mentor.cc.purdue.edu (USENET News)
  7. Organization: Purdue University Computing Center
  8. References: <1993Jan27.204753.23339@nmsu.edu>
  9. Date: Wed, 27 Jan 1993 21:49:05 GMT
  10. Lines: 17
  11.  
  12. In article <1993Jan27.204753.23339@nmsu.edu> jsz@scf.nmsu.edu (Henri De Valois) writes:
  13. >
  14. > I am trying to write a script,that would append to each EOL
  15. > some string,say `blah'. but when I do "sed -e 's/^/blah/g' inputfile > outputfile"
  16. > `blah' inserts at the begining of each line.
  17.  
  18.     Use s/$/blah/
  19.  
  20.     ^ matches the beginning of the line
  21.     $ matches the end of the line
  22.  
  23.  
  24. Rob
  25. -- 
  26. | Robert Davis                                    davis@sonata.cc.purdue.edu
  27. | "Look up, Hannah.  Look up."                            NeXT Mail accepted
  28. --
  29.