Bourne Shell FOR loop confusion

Maarten Litmaath maart at cs.vu.nl
Mon Aug 14 22:00:52 AEST 1989


jdpeek at RODAN.ACS.SYR.EDU (Jerry Peek) writes:
\...	while read user passwd uid junk
\	do
\	   line=`expr $line + 1`
\	   echo "user${line}='$user' uid${line}='$uid'" 1>&4
\	done </etc/passwd 4>$defs

Why use fd 4, Jerry?  Stdout will do.
-- 
"Mom! Eric Newton broke the day! In 24   |Maarten Litmaath @ VU Amsterdam:
  parts!" (Mike Schmitt in misc.misc)    |maart at cs.vu.nl, mcvax!botter!maart



More information about the Comp.unix.questions mailing list