Bourne to read?

uunet!bria!mike uunet!bria!mike
Fri Mar 1 18:49:31 AEST 1991


In an article, sardion.unl.edu!mosemann (Russell Mosemann) writes:
>
>   In the Bourne shell, why does this not work
>
>      echo words | read W
>
>   but this does (if I put the words in the file)
>
>      read W < file

The read is in a different instance of the shell.  The shell forks the
read, and proceeds to create/modify the environment variable.  When the
child dies, so does its environment.

-- 
Michael Stefanik, MGI Inc., Los Angeles| Opinions stated are not even my own.
Title of the week: Systems Engineer    | UUCP: ...!uunet!bria!mike
-------------------------------------------------------------------------------
Remember folks: If you can't flame MS-DOS, then what _can_ you flame?



More information about the Comp.unix.questions mailing list