Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!rutgers!bpa!cbmvax!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.unix.questions Subject: Re: sed question Keywords: sed, regexp, Pnews, Rnmail Message-ID: <939@philmds.UUCP> Date: 28 Jan 89 09:43:22 GMT References: <17810@vax5.CIT.CORNELL.EDU> <938@philmds.UUCP> Reply-To: leo@philmds.UUCP (Leo de Wit) Distribution: comp Organization: Philips I&E DTS Eindhoven Lines: 9 In article <938@philmds.UUCP> leo@philmds.UUCP (Leo de Wit) writes: |sed '/^Reply-To:/s/()/('$REALNAME')/g' your_file Sorry, I was too fast. This fails if $REALNAME contains spaces. Better do it like this (assuming you're using a Bourne shell): sed "/^Reply-To:/s/()/($REALNAME)/g" your_file Leo.