Using bc in bash script
Charles Howse
chowse at charter.net
Thu Aug 14 09:46:10 PDT 2003
> > Can I refine it to give me something like: .784 seconds?
>
> Use "bc -l" instead of bc. That should do it.
No, that still gives 0 seconds.
I think this whole thing is dependent on the fact that `date +%s`
reports integers.
I'm still interested in something like .874 seconds, but for the time
being, I'll just use an if..then..else to say "less than 1 second" or
the actual number of seconds.
I've looked at the time command suggested by Jez, haven't tried it yet.
Geeeezz, why don't they include some *SIMPLE* examples in the man pages?
Not everybody has a degree in Advanced Calculus and works as a C++
programmer. ;-)
More information about the freebsd-questions
mailing list