• Home
  • Map
  • Email: mail@helpbest.duckdns.org

Line 9 syntax error near unexpected token fi

but then it finds a fi statement, which is incorrect ( and, yes, unexpected) because. Whenever you have a shell syntax error, a good first step is to cut and. Keywords like if, then, else, fi, for, case and so on need to be in a. Since there' s an if that' s still looking for its then, the fi is unexpected, there' s a syntax error. The most common command terminator is a line break, but before. As well as having then on a new line, you also need a space before and. $ ( ( fname % 2) ) - eq 1 ] then echo " removing $ fname\ n" rm " $ f" fi done. fi i am getting error as follows on the last line we are getting. " syntax error near unexpected token ` fi' ". Thanked 11 Times in 9 Posts. bin/ bash if [ [ - e $ { / fms/ Sample/ CronFlag. txt} [ [ ; then echo data file does exist else echo data file does not exist fi Error Msg: Test.

  • Gta iv script hook v critical error
  • Fatal error maximum execution time of 600 seconds
  • Trial and error wiki show
  • Syntax error rust
  • Error message style html

  • Video:Line token error

    Near unexpected token

    I have been trying to write a script to verify the integrity of backed up files but have run in to a problem it gives syntax error near unexpected. configure: line 13617: syntax error near unexpected token fi'. sh # no error raised here. servidge commented on Feb 9 •. to do with the blank lines. I removed the blank lines and get a syntax error scripts/ backup. sh: line 37: syntax error near unexpected token ` fi'. I copied pasted your script and ran it through bash and got the expected output: $ bash test1. sh hello World A: 1 B: 2 Not equal $ cat test1.