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

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!spool.mu.edu!caen!uakari.primate.wisc.edu!usenet.coe.montana.edu!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.151513.8508@unlinfo.unl.edu>
  6. Keywords: ex silence option
  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:15:13 GMT
  12. Lines: 33
  13.  
  14. I am using the ex editor in a shell file and wish to suppress the 
  15. interactive feedbaack to the user.  I have read the man page on ex
  16. wish shows the option to be - | -s.   
  17. I beleive my problem is syntax but can't quite figure it out.  Here is 
  18. a copy of the shell program:
  19. string="`grep $1 ${CSHRC}`"
  20.  
  21. /**********************************************/
  22.  
  23. if [ -z "$string" ]
  24. then
  25. echo "setenv $1 $2" >> ${CSHRC}
  26.  
  27. else
  28. ex - | -s  ${CSHRC} <<-end_of_edit
  29. /setenv *$1
  30. d
  31. i
  32. setenv $1 $2
  33. .
  34. w
  35. q
  36. end_of_edit
  37.  
  38. fi
  39.  
  40.  
  41. /**********************************************/
  42.  
  43.  
  44. if anyone can help please send a reply to:
  45. lappala@cse.unl.edu
  46. thanks
  47.