home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / shell / 4832 < prev    next >
Encoding:
Text File  |  1992-11-21  |  704 b   |  17 lines

  1. Organization: Freshman, MCS general, Carnegie Mellon, Pittsburgh, PA
  2. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!dw3u+
  3. Newsgroups: comp.unix.shell
  4. Message-ID: <Ef3iPSy00aw40OtpQi@andrew.cmu.edu>
  5. Date: Sat, 21 Nov 1992 20:48:14 -0500 
  6. From: "Daniel C. Wang" <dw3u+@andrew.cmu.edu>
  7. Subject: Static Variables
  8. Lines: 7
  9.  
  10.  
  11. Is there anyway to save the value of a variable in a shell script so
  12. that it behaves like a C static variable.  i.e. each invocation of the
  13. shell script retains the value of the variable.
  14.  
  15. I've kludge together a method using temp files, but I'm sure there is
  16. a more elegant way to do this.
  17.