[Linux-Biella] script sh
CIARROCCHI Paolo
linux@bilug.linux.it
Mon, 24 Mar 2003 14:30:40 +0100
Qualcuno mi puo consigliare una forma piu' pulita di:
bash-2.05$ cat totale_MO.sh
#Effettua la somma degli MO generati in un giorno
a=`cat $1| cut -d ";" -f 3|grep -v MO`
tot=0
for s in `echo $a`
do
tot=`expr \$tot + $s`;
done
echo "tot="$tot
Grazie!
Paolo
=================================
"STRICTLY PERSONAL AND CONFIDENTIAL
This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."
=================================