read

Mark P. Line markline at henson.cc.wwu.edu
Fri Mar 25 09:36:43 EST 1994


On Fri, 25 Mar 1994, Laxmi Prasad Musunur wrote:

> Jim:
> read() is a system call not a unix command. e.g. If you write a
> c-program involving read it would work.
> 
> p.s. If you can not run a command from your shell, then you cant run
>      it in a shell script either!  

I just checked through about a half-dozen different references on the
Bourne shell, and every one of them included "read" as a built-in shell
command. There is a system call read(), of course, but that's not what Jim
meant. Also, the built-in shell command 'read' even works outside of a
shell script (e.g. on the usual interactive command line), although I've
never been able to think of any use to which I might want to put it
in that context.

Okay, it's time for a vote: Is anybody besides Jim confronted with a
vanilla Unix shell that doesn't understand read on the command line (we'll
assume that it'll be understood in a script in that case)? Just enter
something like

     read DUMMY

and type "Mark is one" on the next line. If 'read' is working, then you
should be able to enter

     echo $DUMMY

and get whatever you typed into 'read' back out of the variable again.

-- Mark

--------------------------------------------------------------------
Mark P. Line                       Phone: +1-206-733-6040
Open Pathways                        Fax: +1-206-733-6040
P.O. Box F                         Email: markline at henson.cc.wwu.edu
Bellingham, WA 98227-0296
--------------------------------------------------------------------





More information about the grass-user mailing list