Xref: utzoo comp.unix.questions:31649 comp.unix.shell:2251 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!samsung!uunet!ora!jerry From: jerry@ora.com (Jerry Peek) Newsgroups: comp.unix.questions,comp.unix.shell Subject: Re: Help bourne shell problem on sun and bsd Summary: "read" can't always be redirected; try backquotes Message-ID: <1991May25.055019.14336@ora.com> Date: 25 May 91 05:50:19 GMT References: <3089@cod.NOSC.MIL> Distribution: usa Organization: O'Reilly and Associates Inc., Cambridge, MA Lines: 16 In article <3089@cod.NOSC.MIL> medin@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@ora.com