Thread: reading stdin
View Single Post
Old Dec 9th, 2006, 9:16 PM   #2
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
I found a way:
if ! [ -t 0 ]; then
	read -a foo
fi

Finished script (until I find another thing I should but haven't implemented): http://athingis.boldlygoingnowhere.org/software/prefix
__________________
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