Help bourne shell problem on sun and bsd

Jerry Peek jerry at ora.com
Sat May 25 15:50:19 AEST 1991


In article <3089 at cod.NOSC.MIL> medin at cod.nosc.mil (Ted Medin) writes:
> pwd > temp
> read dir < temp
> 
>  Just hangs until you type something on the keyboard when using bsd 4.3.
>  Is "read" keyboard input only or ?????

On some Bourne shells, you can't redirect the input of "read" that way.
I used 4.3BSD five years ago or so and I'm pretty sure that was the case.

You should probably be using command substitution instead of a "read"
command, anyway.  This command will do the same thing without a temp file:

	dir="`pwd`"

--Jerry Peek @ O'Reilly & Associates, jerry at ora.com



More information about the Comp.unix.questions mailing list