: !/bin/sh #GSMDETaline = 13771|0409565413|Telstra|NATIONAL DIRECT|Sep 2002|23/09/2002|161700|MAIDSTONE|0438040981MNET|0438040981|P|117|0.81| cat getGSMDETalinetot.out | \ awk -F'|' -v "GSMmobile=$1" '{ mobile = $2 callcost = $13 if ( mobile != GSMmobile ) continue print $0 ctot += callcost } END { print "" print "ctot = " ctot }'