Syntax error near unexpected token `elif'

前端 未结 5 2049
悲&欢浪女
悲&欢浪女 2021-01-03 22:01
./chkf: line 30: syntax error near unexpected token `elif\'
\'/chkf: line 30: `elif [ -f \"$object\" ] ; then


if [ -d \"$object\" ] ; then
    message=\"$message a         


        
5条回答
  •  梦毁少年i
    2021-01-03 22:34

    Now that you've added the additional error message, I have a thought: the ^M is \r, which is the Mac OS X line ending or part of the Windows line ending - Linux uses \n only as EOL. If you edit in vim, you should be able to see the ^M if it's not right through the file.

提交回复
热议问题