Don't be that hard on yourself, Craig!
Seeing that the units are only optional, it's not outright wrong to just
provide old-fashioned seconds without an explicit unit. But it may be
worthwhile noting that it also supports more than one argument, and the
arguments can be in different units that are simply added together, e.g.,
sleep 1m 20s 0.001h
will be the same as
sleep 83.6
I don't know the maximum number of days, hours, minutes or seconds that
it will accept, though, but it doesn't complain when I am giving it a
number of days much greater than the current age of the universe - which
does not mean it would actually execute this correctly... (if we are
just disregarding the fact that the universe won't be there long enough
for the sake of the argument; no pun intended). But it may not be
checking the validity of the arguments regarding overflow. Sorry, don't
have time to read the source...
Kind regards,
Helmut.
--
+------------------------+
| Helmut Walle |
| [email protected] |
| +64-21-446 137 |
+------------------------+
On 11/03/15 21:26, C. Falconer wrote:
Turns out I've been using the sleep command wrong for years.
It now supports units and floating point numbers
So you can say sleep 24h instead of sleep 86400
_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users