Path: utzoo!attcan!uunet!tank!uxc!csd4.milw.wisc.edu!mailrus!cornell!vax5!jhc From: jhc@vax5.CIT.CORNELL.EDU Newsgroups: comp.unix.questions Subject: sed question Keywords: sed, regexp, Pnews, Rnmail Message-ID: <17810@vax5.CIT.CORNELL.EDU> Date: 27 Jan 89 04:05:47 GMT Sender: news@vax5.CIT.CORNELL.EDU Reply-To: jhc@Vax5.CIT.Cornell.EDU (James H. Cloos, Jr.) Followup-To: comp.unix.questions Distribution: comp Organization: Cornell Information Technologies, Ithaca, NY 14853 Lines: 35 Hello. Our implementation of the news software, because it is run in Eunice on top of VAX/VMS, has some shortcomings. One of these, is that, when using Pnews or Rnmail, the Reply-To: line does not include your real name, just a pair of parenthesis. I would like to add a line to my personalised copies of Pnews and Rnmail to automate adding in the realname info. Unfortunately, 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. Perhaps it would be more understandable liek this: what we have: \050\051 what we want: \050($REALNAME)\051 where: \nnn is the character specified by nnn ascii, nnn in octal and: ($CCC) is the value of the env. variable named CCC. As an alternative, I would accept having a specific string inserted between the parenthesis on the Reply-To: line rather than the value of the env. variable. Is this possible? Thanks in advance for any help in this. P.S. Pnews & Rnamil are written in sh, for those unfamiliar w/ those 2 scripts. -JimC -- James H. Cloos, Jr. "Entropy isn't what it used to be." jhc@Crnlvax5.BITNET --c/o Fortune @ batcomputer.UUCP jhc@Vax5.CIT.Cornell.EDU #include cornell!vax1!vax5.cit.cornell.edu!jhc@rochester.UUCP B-7 Upson Hall, Cornell Univ., Ithaca, NY 14853 +1 607 272 4519