home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / admin / 4999 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.0 KB  |  44 lines

  1. Newsgroups: comp.unix.admin
  2. 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
  3. From: lappala@unlinfo.unl.edu (Kris Lappala)
  4. Subject: ex editor options 
  5. Message-ID: <1992Sep9.152532.8722@unlinfo.unl.edu>
  6. Keywords: ex editor silence options
  7. Sender: news@unlinfo.unl.edu
  8. Nntp-Posting-Host: unlinfo.unl.edu
  9. Organization: University of Nebraska - Lincoln
  10. Distribution: g
  11. Date: Wed, 9 Sep 1992 15:25:32 GMT
  12. Lines: 30
  13.  
  14. I am working on a shell file using the ex editor and need to suppress all
  15. interactive feedback.  The man page tells me that - | -s should do the 
  16. trick but I am getting hung up on the syntax.  Here is a copy of my code:
  17.  
  18. /****************************/
  19.  
  20. string="`grep $1 ${CSHRC}`"
  21.  
  22. if [ -z "$string" ]
  23. then
  24. echo "setenv $1 $2" >> ${CSHRC}
  25.  
  26. else
  27. ex - | -s  ${CSHRC} <<-end_of_edit
  28. /setenv *$1
  29. d
  30. i
  31. setenv $1 $2
  32. .
  33. w
  34. q
  35. end_of_edit
  36.  
  37. fi
  38.  
  39.  
  40. /****************************/
  41.  
  42. If anyone can help please respond to: lappala@cse.unl.edu
  43. thanks
  44.