All pastes #731873 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-10-10 13:56 UTC
rendered paste body
# An awk program to display missing/over hours
/OUT/ { num_OUT++ };
/OUT/ { num_out++; timeout += $1 }
/IN/  { num_in++; timein += $1 }
END {   hours_act = ((timeout - timein) / 60 / 60);
        days_wkd = (num_OUT / 2);
        hours_exp = (num_OUT * 4);
        hours_diff = (hours_act - hours_exp);
        print "Time summary to date:";
        printf ("\n")
        printf ("       Days worked:            %2d\n", days_wkd);
        printf ("       Hours worked:           %5.2f\n", hours_act);
        printf ("       Diff from expected:     %5.2f\n", hours_diff);
 }