home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / shell / 5497 < prev    next >
Encoding:
Text File  |  1993-01-26  |  1.5 KB  |  40 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!usc!sdd.hp.com!saimiri.primate.wisc.edu!hp9000.csc.cuhk.hk!uxmail!ustsu5.ust.hk!cs_hwtse
  3. From: cs_hwtse@uxmail.ust.hk (Tse Hiu Wa, FRANCO)
  4. Subject: Help in CShell!!
  5. Message-ID: <1993Jan26.061135.28436@uxmail.ust.hk>
  6. Sender: usenet@uxmail.ust.hk (usenet account)
  7. Organization: Hong Kong University of Science and Technology
  8. X-Newsreader: TIN [version 1.1 PL8]
  9. Date: Tue, 26 Jan 1993 06:11:35 GMT
  10. Lines: 28
  11.  
  12.  
  13. I have some problems when I write shell script. Can anyone help me to solve 
  14. the following questions.
  15.  
  16. 1)    If I want the user to press only one char from the keyboard 
  17.     using "set ans = $<", how can I set the environment such that he 
  18.     does not need to press the key "Enter" but I can get the input?
  19.  
  20. 2)    Can I trap the signal '' when I run the shell script just like
  21.     I use onintr to trap the signal ''.
  22.  
  23. 3)    If I ask the user to enter the input, i.e. "set answer = $<"
  24.     How can I test whether the input is number or not just like using
  25.     the function isdigit() in C to test the variable?
  26.  
  27. Franco:)
  28.  
  29. --
  30.  
  31. Hong Kong University of Science and Technology
  32.  
  33.                                      ,,,,
  34.                                     /_  _\
  35.                                ooo ( O  O ) ooo
  36.  \.../  |~~~~~~~~~~~~~~~~~~~|~~(((~~~~~~~~~~)))~~|~~~~~~~~~~~~|~~~~~~~~~~~~~~~|
  37.   O.o   |Name               |E-mail              |Room no.    |Tele no. (Home)|
  38.  (___)  |Tse Hiu Wa, Franco |cs_hwtse@stu.ust.hk |no room :-( |3231716        |
  39.    U    |~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~|~~~~~~~~~~~~~~~|
  40.