From: "Marcel Kurz"
ich hab hier ein Script(für Wget ftp Download) das mir immer das aktuelle Datum plus eins ausgeben soll aber irgendwie funzt das nicht so ganz :( weil am Samstag hat er mir den 31.09.2000 ausgegeben. Und dann bekomm ich auch nicht 02.10.2000 sondern immer 2.10.2000. Was muss ich ändern ??
#/bin/sh declare -i tag=0 tag=(`date +%d`+1) restdatum=`date +%m.%Y`
#!/usr/bin/perl my $basetime = $^T; $basetime += 24*60*60; # + 24h x 60min x 60sec my ($day, $month, $year) = (localtime($basetime))[3..5]; $month++; $year += 1900; # seltsames localtime... $restdatum = sprintf("%02d.%02d.$04d", $day, $month, $year); chdir("/wo/solls/hin"); system("wget ftp://was.weiss.ich/wo/das/ist/$restdatum"); TESTED. Bis auf die letzen beiden Zeilen :) -- Marco Dieckhoff icq# 22243433 PGP key 9EFA D64F 5DAA D36B E0E7 CE1B 9E1B 4903 0C51 1632 --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com