[ale] Bash confusion

Robert L. Harris robert.l.harris at gmail.com
Wed Jul 20 11:41:19 EDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Ok, simple one...  I have a script that has this:


#!/bin/bash

date=`date +%d`
if [ $date = "01" ]; then
   # Run Monthly Backup
else
   # Run Incremental Backup
fi

- From the man page of 'date':
         %d     day of month (e.g, 01)

And when I set it up last year, it did run a full on 11/01/2010.  But
now it's not.  Going to convert it to a numerical '-eq' comparison but
it's still got me wondering why it's picking the wrong date.  Any ideas?

Robert

- -- 

:wq!
====================================================================
Robert L. Harris                     | GPG Key ID: E344DA3B
                                         @ x-hkp://pgp.mit.edu
DISCLAIMER:
      These are MY OPINIONS             With Dreams To Be A King,
       ALONE.  I speak for              First One Should Be A Man
       no-one else.                       - Manowar

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk4m9x8ACgkQ8+1vMONE2jvuSgCgmi/771au8rOxhSLm0iwfuJ4x
aV8AnjfTb/21A/w4PBUfCnZ1G7CcPKxl
=UYaq
-----END PGP SIGNATURE-----



More information about the Ale mailing list