$ shellcheck file
In file line 2:
MODIFIED_APP_FOLDER= = $([[ $APP_FOLDER= './'* ]] && echo "${APP_FOLDER/'./'/"$PWD"}" || echo "$PWD/$APP_FOLDER")
^-- SC1007 (warning): Remove space after = if trying to assign a value (for empty string, use var='' ... ).
^-- SC1009 (info): The mentioned syntax error was in this command expansion.
^-- SC1073 (error): Couldn't parse this test expression. Fix to allow more checks.
^-- SC1108 (error): You need a space before and after the = .
^-- SC1072 (error): Expected comparison operator (don't wrap commands in []/[[]]). Fix any mentioned problems and try again.
For more information:
https://www.shellcheck.net/wiki/SC1108 -- You need a space before and after...
https://www.shellcheck.net/wiki/SC1007 -- Remove space after = if trying to...
https://www.shellcheck.net/wiki/SC1072 -- Expected comparison operator (don...
2条答案
按热度按时间ryhaxcpt1#
这里不需要使用子shell扩展和Bash:
样本输出:
ukqbszuj2#
就像这样:
在请求人工帮助之前,请始终将脚本传递给https://shelcheck.net。或者使用命令行:
更正代码: