sed question

Leo de Wit leo at philmds.UUCP
Sat Jan 28 19:31:50 AEST 1989


In article <17810 at vax5.CIT.CORNELL.EDU> jhc at Vax5.CIT.Cornell.EDU (James H. Cloos, Jr.) writes:
   []
|I'm having difficulty getting the sed line correct.  Specifically, I want
|sed to find the line that starts Reply-To: and then replace any instances of
|() with ($REALNAME) where $REALNAME is the value of the environmental
|variable REALNAME, and where the parenthesis are in the file.
   []

sed '/^Reply-To:/s/()/('$REALNAME')/g' your_file

Since the $REALNAME is outside quotes, it is expanded by the shell.

    Leo.



More information about the Comp.unix.questions mailing list