* On 21 Apr 2016, Jon LaBadie wrote: 
> 
> Unless it has changed recently, bash runs redirected read
> commands in a sub-process.  Thus the variable fn would not
> get set in the main process.

I haven't run into this (that I recall) with regular input redirection.
It does happen with piped input redirection (to a read) because the
pipeline terminal isn't the current shell.

yes:
read fn </dev/tty

no:
cat /dev/tty | read fn

-- 
David Champion • d...@bikeshed.us

Reply via email to