So I am trying to do an if else if else statement in a bash script. As of now when I run this script I get the following error message "./groupJobs.sh: line 76: syntax error near unexpected token elif'
./groupJobs.sh: line 76:
elif [ $jobsize -lt $2 ]; then'"
I have looked online at multiple examples and cannot see any difference in what I have done and what others say works.
Any help would be appreciated. (line 76 is the last elif statement)
if [ $filesize -ge $2 ]; then
#goes this way if file is to big to put in a job with anyother files
$filename >> $jobname$jobnumber;
elif [ $jobsize -ge $2 ]; then
#job is done being created
elif [ $jobsize -lt $2 ]; then
#add file to job and move on to next file check
fi