[Gllug] Arithmetic error in bash on 08 and 09?
Holger Duerer
hduerer at gmx.net
Mon Jul 26 12:46:21 UTC 2004
>>>>> "Liam" == Liam Delahunty <liamvictor at gmail.com> writes:
Liam> going back to my original problem of removing 1 from the
Liam> hour and then grepping the time in a log file I've come up
Liam> with the following.
[...]
If you have GNU's date (I don't think the others have, but please
correct me if I am wrong), you could of course also let date do the
calculation itself:
,----
| ph = $(date --date "1 hour ago" %H)
`----
Holger
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list