home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!rpi!masscomp!peora!tarpit!fang!gator!rde!tssi!unlinfo.unl.edu!unlinfo!lappala
- From: lappala@unlinfo.unl.edu (Kris Lappala)
- Subject: HELP w/ ex
- Message-ID: <1992Sep10.132256.24519@unlinfo.unl.edu>
- Keywords: HELP w/ ex editor
- Sender: news@unlinfo.unl.edu
- Nntp-Posting-Host: unlinfo.unl.edu
- Organization: University of Nebraska - Lincoln
- Distribution: g
- Date: Thu, 10 Sep 1992 13:22:56 GMT
- Lines: 26
-
- I am using the ex editor in a shell program and need to suppress the
- interactive feedback to the user. Here is a copy of my code:
-
- CSHRC=/tmp/cshrc
-
- string="`grep $1 ${CSHRC}`"
-
- if [ -z "$string" ]
- then
- echo "setenv $1 $2" >> ${CSHRC}
-
- else
- ex - | -s ${CSHRC} <<-end_of_edit
- /setenv *$1
- d
- i
- setenv $1 $2
- .
- w
- q
- end_of_edit
-
- fi
-
- if anyone can help with this problem please write.
- thanks lappala@cse.unl.edu
-