Here's my script
#! /bin/sh
source=/Source/$1
destination=/Destination
folderParam=$(basename $source)
if /usr/bin/rsync -avh -r $source $destination; then
cp /FolderCopyStatus/Success /Status/Success_$folderParam;
mysql -h ip -uroot -ppassword << EOF
use oct_test;
insert into Test(Name,Value,Status) values('rsync',$folderParam,'Ok');
EOF
else
cp /FolderCopyStatus/Failure /Status/Failure_$folderParam;
mysql -h ip -uroot -ppassword << EOF
use oct_test;
insert into Test(Name,Value,Status) values('rsync',$folderParam,'Fail');
EOF
fi
Error and Warning
/FinalSync.sh: line 18: warning: here-document at line 8 delimited by end-of-file (wanted `EOF') /FinalSync.sh: line 19: syntax error: unexpected end of file
I know there is a simple thing that I am missing.Newbie to shell scripting.