Hallo, On Wed, 16 Apr 2003, Peter Wiersig wrote:
David Haller wrote:
if test $(( `date '+%s'` - `date -r DATEI '+%s'` )) -gt 86400; then
%s ist uebrigens ne GNU Erweiterung.
*ups* Aber verdammt praktisch ;) Zudem ich kein "stat" Befehl habe ;)
Falls man ggfs. aus den Sekunden wieder ein Datum moechte, dann muss man (AFAIK) mehr oder weniger indirekt 'strftime' und 'gmtime' oder 'localtime' bemuehen. In perl z.B:
$ perl -MPOSIX -e 'print strftime("%c\n", localtime(1000000000));' Son 09 Sep 2001 03:46:40 CEST
Huh, 'info "(sh-utils.info.gz)Examples of date"' spuckt eine kompaktere Methode aus.
Welche? Ich finde da jedenfalls nix...
(Ok, David, bei dir vielleicht noch nicht.)
Vermutlich ;( $ date --version date (GNU sh-utils) 1.16 -dnh -- PC's are designed by a committee of people who are in different companies in different countries and who never talk to each other. -- Derick Siddoway And nobody speaks the same language and they hate each other... -- Chris Adams