Thread: reading stdin
View Single Post
Old Dec 9th, 2006, 4:12 AM   #1
a thing
Unverified User
 
a thing's Avatar
 
Join Date: Aug 2005
Location: none
Posts: 146
Rep Power: 0 a thing is on a distinguished road
reading stdin

I want to read stdin and put it in array foo, but I don't want to bring up the prompt if stdin is empty, like
read -a foo
does. If "-t 0" is passed to read, then it doesn't put stdin into $foo when there's actually something in stdin.
__________________
Warning: My posts may change (dramatically) within the first 15 minutes they're posted.
Got 'Nux?—GNU/Linux and other free software support.
It's GNU/Linux, not just Linux.
a thing is offline   Reply With Quote