I cant figure out why the variable in in loop2 does not hike to +1? (its a friday, i am dazed, I admit. but this should not be a mystery!) any help would be much appreciated.
$ cat loop1 #! /bin/bash date > /tmp/somefile b="1" while read blah; do let b=(b+1) done < /tmp/somefile echo "variable is $b" $ cat loop2 #! /bin/bash date > /tmp/somefile b="1" cat /tmp/somefile | while read blah; do let b=(b+1) done echo "variable is $b" $ ./loop1 variable is 2 $ ./loop2 variable is 1 _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[email protected]"
