ksh reopening stdin

2014-02-25 Thread LEVAI Daniel
Hi! I'm doing this: --- script.sh --- #!/bin/ksh for word in $(tr '\n' ' ');do # ^^ tr(1) reads from standard input ... some stuff ... done read FOO case ${FOO} in ... ... ... esac --- script.sh --- $ script.sh /foo/bar The problem with this of course, is

Re: ksh reopening stdin

2014-02-25 Thread Jérémie Courrèges-Anglas
LEVAI Daniel l...@ecentrum.hu writes: Hi! Hi Daniel, I'm doing this: --- script.sh --- #!/bin/ksh for word in $(tr '\n' ' ');do # ^^ tr(1) reads from standard input ... some stuff ... done read FOO case ${FOO} in ... ... ... esac --- script.sh ---

Re: ksh reopening stdin

2014-02-25 Thread LEVAI Daniel
On k, febr 25, 2014 at 14:19:44 +0100, Jérémie Courrèges-Anglas wrote: LEVAI Daniel l...@ecentrum.hu writes: Hi! Hi Daniel, [...] Try using ''read /dev/tty'' for your interactive user input. Cheers, Jérémie! I can even use `exec 0/dev/tty' before any read! Daniel -- LÉVAI Dániel