In the last episode (Aug 14), Richard Tobin said: > > I'm trying to calculate the number of seconds between $start_time and > > $end_time in a bash script. > > Bash has built-in integer arithmetic: > > et=$[End_time - Start_time]
Most bourne-based shells have arithmetic evaluation. For portability, you should use the $(( )) syntax: /bin/sh $ echo $(( 1 + 3 )) 4 $ -- Dan Nelson [EMAIL PROTECTED] _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"