Jon Haugsand wrote:
You can, in our situation do something like:

while read a b c d; do
 case "$a" in
   root)
     export R="ok"
     ;;
   daemon)
     export D="ok"
     ;;
   esac
 done < /etc/passwd

And your "side effects" remain.

(But I buy the point of portable scripting anyway.)

Ah, yes of course - I sort of simplified the example a bit; in the original the 'cat /etc/passwd' was a lengthy pipe of several greps and seds etc.

/jan




--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to