1

/shell-script: syntax error near unexpected token `done'

view story
linux-howto

http://unix.stackexchange.com – I am getting syntax error near unexpected token done while executing my shell script: while read filename do echo "$filename" if [ -s $filename ]; then tail -10 $filename | grep `date '+%Y-%m-%d'` >> $lastlines1 echo "- Next Error File - " >> $lastlines1 done else echo " no errrors" fi Any ideas, where am I going wrong? (HowTos)