home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.admin
- Path: sparky!uunet!paladin.american.edu!europa.asd.contel.com!news.ans.net!rpi!masscomp!peora!tarpit!fang!gator!rde!tssi!unlinfo.unl.edu!unlinfo!lappala
- From: lappala@unlinfo.unl.edu (Kris Lappala)
- Subject: ex editor options
- Message-ID: <1992Sep9.152532.8722@unlinfo.unl.edu>
- Keywords: ex editor silence options
- Sender: news@unlinfo.unl.edu
- Nntp-Posting-Host: unlinfo.unl.edu
- Organization: University of Nebraska - Lincoln
- Distribution: g
- Date: Wed, 9 Sep 1992 15:25:32 GMT
- Lines: 30
-
- I am working on a shell file using the ex editor and need to suppress all
- interactive feedback. The man page tells me that - | -s should do the
- trick but I am getting hung up on the syntax. Here is a copy of my code:
-
- /****************************/
-
- 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 please respond to: lappala@cse.unl.edu
- thanks
-