I keep getting this error "line 36: syntax error: unexpected end of file", ive googled it and the only solutions i could find were not working. im still not entirely sure im running the program correctly. im using this command in my linux terminal: "bash Homework5Bash.bash"
Code:
#!/bin/bash
name=$"Joe Shmoe"
echo "$name"
var=0
while [$var -lt 101]
do
i=var%2;
if [$i = 0];then
echo "$var";
fi
j=var%17;
if [$j = 0];then
if [$i = 0];then
echo " banana,";
else
echo "$var banana";
fi
fi
k=var%15;
if [$k = 0];then
if [[$i = 0] || [$j = 0]]; then
echo " pear";
else
echo "$var pear,";
fi
fi
l=var%6;
if [$l = 0];then
echo "orange";
fi
var=$[$var+1];
echo "\n";
done
Im really just looking for any way to solve that end of file error, just so I can have the program at least run.