3 Apr 2002 09:31
go-pear: Why read < /dev/tty?
Alexander Skwar <ASkwar <at> host.homelinux.org>
2002-04-03 07:31:34 GMT
2002-04-03 07:31:34 GMT
Hi! I'm right now checking out go-pear and found that it does "read < /dev/tty". This will make the script be "unscriptable", that is, I cannot pipe default values to it. And I also don't understand why it does this in the first place. read defaults to reading from stdin and stdin is mostly /dev/tty, isn't it? Attached you find a patch that removes the "< /dev/tty" parts. Alexander Skwar -- -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.iso-top.de | Jabber: askwar <at> charente.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 day 20 hours 28 minutes
--- go-pear Wed Apr 3 09:25:58 2002 +++ go-pear.without-dev-tty Wed Apr 3 09:26:39 2002 <at> <at> -66,7 +66,7 <at> <at> echo "Which file name do you want for the 'pear' executable?" echo -n "[$TARGET] : " -read destpearin < /dev/tty +read destpearin if [ ! -z "$destpearin" ]; then TARGET=$destpearin fi <at> <at> -80,7 +80,7 <at> <at>(Continue reading)

RSS Feed