Ian MacGregor <[EMAIL PROTECTED]> wrote: > I think I found a bug in the mv command. ... > When I change line #9 in the bash script from > mv /home/storage/backup.tar.gz /home/storage/`date +%Y%m%d-%k%M`-backup.tar.gz > to > mv /home/storage/backup.tar.gz /home/storage/`date +%Y%m%d-%I%M`-backup.tar.gz > the command runs fine and the only output is below, and as a cronjob, it runs
Thanks for the report, but that's not a bug in mv. Your date command is printing a space in the expansion of %k when the hour is a single digit number. That space makes it so `mv' sees three arguments, and provokes the diagnostic you reported. $ date --date='2005-02-04 02:00' +%Y%m%d-%k%M 20050204- 200 Use a format like %H that has zero-filled numbers. $ date --date='2005-02-04 02:00' +%Y%m%d-%H%M 20050204-0200 _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils