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