I have just installed redhat 7.3 which is using shell sh-2.05a and am trying to run my backup scripts that I used on redhat 7. I have changed the script for the question. The script looks like this :-
#!/bin/sh
DAY=`date | /bin/cut -b1-3`
#
if [ $DAY = Wed ]
then
BACKUP_TYPE=FULL
else
BACKUP_TYPE=DAILY
fi
case $BACKUP_TYPE in
FULL)
echo "FULL BACKUP RUNNING"
;;
DAILY)
echo "DAILY BACKUP RUNNING"
;;
esac
Here is the error :-
'/backup.sh: line 25: syntax error near unexpected token `in
'/backup.sh: line 25: `case $BACKUP_TYPE in
I also have this script running on a Sun machine.
TIA
#!/bin/sh
DAY=`date | /bin/cut -b1-3`
#
if [ $DAY = Wed ]
then
BACKUP_TYPE=FULL
else
BACKUP_TYPE=DAILY
fi
case $BACKUP_TYPE in
FULL)
echo "FULL BACKUP RUNNING"
;;
DAILY)
echo "DAILY BACKUP RUNNING"
;;
esac
Here is the error :-
'/backup.sh: line 25: syntax error near unexpected token `in
'/backup.sh: line 25: `case $BACKUP_TYPE in
I also have this script running on a Sun machine.
TIA