I am a bash newbie (a PHP dev posing as a Linux sysadmin).
I have the following if block in a bash script:
if [ "$DAY"=="Sunday" ]; then cp /Drive_D/videos_bu/daily/$TODAY /Drive_D/videos_bu/weekly/$WEEK printf "\n==========\nWeekly Backup - $TODAY SUCCESS!\n==========\n\n" >> $LOG fi
The printf line executes even when the test command is false. Can anyone tell me why?