How To Calculate
I have 2 variables in my shell scripts in which i am using awk and calculating 2 files and getting 2 different variable called in_total and out_total. I want to subtract one variable from another so plz tell me how i can do that.
Example is:
cat in_file | awk -F: '{
in_total += $1 * 86400 + $2 * 3600 + $3 * 60 + $4
}'
cat out_file | awk -F: '{
out_total += $1 * 86400 + $2 * 3600 + $3 * 60 + $4
}'
so plz tell me how i can subtract out_total from in_total
|