I have the following code -
#!/bin/bash
#
while read line
do
awk -F":" -v frdt=$(date --date="$line" +%Y:%m:%d) '(substr($0,1,10)==frdt) { count++} { tbytes+=$12} END {print frdt ", " tbytes/1073741824 ", " count }' /usr/roc/om/server/adm/activity_log
done < DATES
I expected the tbytes value to change based on the date and the amount of data transferred for the given date but the value remains the same.
What am I missing?
Thank you in advance for your help.
SteveR
I.T. where a world of choas and confusion comes down to nothing but 1s and 0s.
#!/bin/bash
#
while read line
do
awk -F":" -v frdt=$(date --date="$line" +%Y:%m:%d) '(substr($0,1,10)==frdt) { count++} { tbytes+=$12} END {print frdt ", " tbytes/1073741824 ", " count }' /usr/roc/om/server/adm/activity_log
done < DATES
I expected the tbytes value to change based on the date and the amount of data transferred for the given date but the value remains the same.
What am I missing?
Thank you in advance for your help.
SteveR
I.T. where a world of choas and confusion comes down to nothing but 1s and 0s.