pearlofperls
Technical User
I'm trying to use 1 script for muliple boxes with same username to backup crontabs
Her is what I have and the problem is the hostname variable wont output to the name of the file
#!/bin/ksh
CHOST=$HOSTNAME
CDATE=`date "+%Y%m%d"`
/usr/bin/crontab -l > /mypath/home/username/crontab_bkp/${CHOST}_${CDATE}_crontab
OUTPUT:
-rw-rw-r-- 1 username users 7885 Apr 22 21:13 _crontab_20100422
Her is what I have and the problem is the hostname variable wont output to the name of the file
#!/bin/ksh
CHOST=$HOSTNAME
CDATE=`date "+%Y%m%d"`
/usr/bin/crontab -l > /mypath/home/username/crontab_bkp/${CHOST}_${CDATE}_crontab
OUTPUT:
-rw-rw-r-- 1 username users 7885 Apr 22 21:13 _crontab_20100422