Using bc in bash script

Richard Tobin richard at cogsci.ed.ac.uk
Thu Aug 14 10:42:36 PDT 2003


> 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]

-- Richard


More information about the freebsd-questions mailing list