Depends on what is permissible.Quote:>echo foo bar baz | read junk *schmutz
>doesn't work outside of ksh.
>How can I do something analogous (where the first part of the pipeline
>is a rather * command) w/o using a temp file?
One way:
set -- `command`
junk=$1 crap=$2 schmutz=$3
Another (bash syntax):
words=(`command`)
junk=${words[0]} crap=${words[1]} schmutz=${words[2]}
Another:
word=0
for x in `command`; do
case $word in
0) junk=$x ;;
1) crap=$x ;;
2) schmutz=$x ;;
esac
word=`expr $word + 1`
done
Another (violating your prohibition on temp files):
command >tmp.$$
exec 3<&1 <tmp.$$
rm -f tmp.$$
read junk *schmutz
exec 1<&3 3>&-
The possibilites abound...
--Ken Pizzini