How do you pipe after a here document

Maarten Litmaath maart at cs.vu.nl
Wed Nov 28 05:19:52 AEST 1990


In article <1F37P47 at xds13.ferranti.com>,
	peter at ficc.ferranti.com (Peter da Silva) writes:
)...
)OK, so how do you pipe that here document through:
)
)	while read foo bar baz
)	do
)	  case $baz in
)	    coconuts) echo $foo $bar THEM;;
)	    *) su root -c 'rm -f /etc';;
)	  esac
)	done

cat << EOF | while read x
foo
bar
baz
EOF
do
	echo x=$x
done
--
"Please DON'T BREAK THE CHAIN!  Terry Wood broke the chain and ended up
writing COBOL PROGRAMS.  Three days later, he found his Blue Star Tatoo
Letter, made 20 copies and mailed them out.  He found a good job writing
compilers."  --  tjw at unix.cis.pitt.edu (Terry J. Wood)



More information about the Comp.unix.shell mailing list