Hi, I'm having trouble with a simple copy command in a script on HPUX.
I am trying to copy a file and append date & time.
The echo command prints out what I am expecting..
However, the copy copies the filename to $DATE.FIXNUM ..
Thanks in advance
I am trying to copy a file and append date & time.
The echo command prints out what I am expecting..
Code:
echo "Backing up $file to $file.$DATE.$FIXNUM" | tee -a $LOGFILE
+ echo 'Backing up /home/efin/gp/source/kerf/verlist.pc to /home/efin/gp/source/kerf/verlist.pc.20150602.12345'
Code:
cp $file $file_$DATE.$FIXNUM | tee -a $LOGFILE
+ cp /home/efin/gp/source/kerf/verlist.pc 20150602.12345