> > The precision is in hundredths of a second as I understand it from > > playing with time(!): > > > > #!/bin/sh > > time_file=tmp.time > > time="time -a -o $time_file" > > $time cat /var/log/messages >/dev/null 2>&1 > > $time cat /var/log/maillog >/dev/null 2>&1 > > awk '{sum+=$1}END{print sum}' $time_file > > rm $time_file > > > > which outputs: > > > > [18:34:03] [EMAIL PROTECTED] /home/munk# sh tmp.sh > > 0.01 > > > > This simple script just times each cat command and appends > the output from > > time to the $time_file, then prints out the sum of the > first columns of > > the time outputs found in the time file. > > > > Just an idea. First, let me thank everyone who responded to my *first* post to this list. This seems like a really good 'community', I'm gonna hang around. ;-)
Now, I've written many bash scripts in RedHat, and FreeBSD's set of commands *is* just a little bit different, but I'm gonna need a little shove in the right direction here. I'm not asking for anyone to re-write anything for me, just a friendly suggestion as to exactly to implement the 'time' command so that the file that my daily_report script generates includes the elapsed time in hundredths on the proper line. I've attached the script for reference.
daily_report.sh
Description: Binary data
_______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"