Thread
:
reading stdin
View Single Post
Dec 9th, 2006, 4:12 AM
#
1
a thing
Unverified User
Join Date: Aug 2005
Location: none
Posts: 146
Rep Power:
0
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
(
Toggle Plain Text
)
read -a foo
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
View Public Profile
Visit a thing's homepage!
Find More Posts by a thing