Getting user input in csh on SCO Unix

Getting user input in csh on SCO Unix

Post by dre.. » Wed, 01 Jan 1997 04:00:00



Oh great Unix gurus of the net, please enlighten me. How can I get SCO Unix to
run my favorite csh Unix shell script shown below to get user input?

grepping around the net I found the ksh FAQ & read solution but I'm sure
some other part of my csh script will then fail...any ideas? Thanks.

#! /bin/csh
# foo.sh
# ------
# example Unix shell script gets input from user
# see also ksh: read var
#
echo Type something and press enter:
set FOO=($<)
# read FOO
echo you entered $FOO

-------------------------------------------------------------------------
 Darrell Reich                           Human Interface Design Engineer

 (619)643-5234 fax:200,**234 BBS:6252018 a Xerox Company, San Diego, CA
-------------------------------------------------------------------------
 "Usability is like oxygen--you never notice it until it is missing..."

 
 
 

Getting user input in csh on SCO Unix

Post by Don Re » Thu, 02 Jan 1997 04:00:00


In the beginning, or at least on Tue, 31 Dec 96 13:04:35 PDT,  

Quote:

>Oh great Unix gurus of the net, please enlighten me. How can I get SCO Unix
to
>run my favorite csh Unix shell script shown below to get user input?

>grepping around the net I found the ksh FAQ & read solution but I'm sure
>some other part of my csh script will then fail...any ideas? Thanks.

line is what you are looking for:

echo "mumblesmurf >\c"
STUFF=`line`
echo you typed $STUFF

--


 Calcasieu Lumber Co.                    Austin TX
  ---- "Ya jus' mash that butt'n, righ' jere"  ---

 
 
 

Getting user input in csh on SCO Unix

Post by Kunta » Sun, 05 Jan 1997 04:00:00



Quote:> run my favorite csh Unix shell script shown below to get user input?
> grepping around the net I found the ksh FAQ & read solution but I'm sure
> some other part of my csh script will then fail...any ideas? Thanks.

> #! /bin/csh
> # foo.sh
> # ------
> # example Unix shell script gets input from user
> # see also ksh: read var
> #
> echo Type something and press enter:
> set FOO=($<)
> # read FOO
> echo you entered $FOO

i dont understand. the script u have shud run perfectly for csh. whats the Q
here? or is this a reply to the Q?
 
 
 

1. getting input from user in UNIX script

Hi there,
I am writing a menu system for UNIX and I need to get a user's input on
which option he/she wishes to choose.  Is there any way you can get user's
input in UNIX script? Actually that input would be an integer number. I
know there is way in DOS BATCH programming.  

If there is how would I do it?
Thanks

- Amar

2. SuSE Denies UnitedLinux Per-Seat License Model; Announces Developer's Version

3. user input in csh

4. Help! with ftape

5. Q simple network concept

6. csh - user input syntax?

7. xfs integrated into kernel source yet?

8. Getting user input

9. Getting user input on same line

10. getting user input with timeout

11. Getting user's input into the if statement

12. getting user input non-blocking