I am trying to create an spritz app! Everything was working fine, but since yesterday I keep getting this error:./spritz: line 176: syntax error: unexpected end of fileI have checked the script file and everything seems perfect! I am confused I have an if statement at last and it looks correct! Here is the last portion:    #checks if speed is 150157 if [[ $2 -eq 150 ]];158 then159 starttime=$SECONDS160      FS=$'\n'161      for j in `grep --color=always -iP '\b[^aeiou\s]*[aeiou][^aeiou\s]*\K[aeiou]' $1`;162      do163            #Reads the text file in the centre of the screen164            echo                                                     ___________________165            echo                                                              $j;166            echo                                                     ___________________167            echo                                                                                Speed 150 wpm168            sleep  0.9;169            clear;170       done171 endtime=$(($SECONDS - $starttime))172            echo You read $words_read words in $endtime seconds!173       exit 8174 fi
Syntax Error: unexpected end of file -- Bash script
bash;scripting
I've corrected some statements, removed some ; and formatted once more. This is the working result:#checks if speed is 150if [ $2 -eq 150 ] ; then    words=0    starttime=$(date +%s)    FS=$'\n'    for j in $(grep --color=always -iP '\b[^aeiou\s]*[aeiou][^aeiou\s]*\K[aeiou]' $1) ; do        #Reads the text file in the centre of the screen        echo                                                     ___________________        echo                                                              $j;        echo                                                     ___________________        echo                                                           Speed 150 wpm        sleep  0.9        clear        words=$(( $words + 1 ))    done    endtime=$(( $(date +%s) - $starttime ))    echo You read $words words in $endtime seconds!    exit 8fi