Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以向我解释为什么以下 shell 脚本行会引发此错误:
语法错误:“(”意外
Shell 脚本期望以以下模式设置变量:
VARIABLE=value
你不能在那里有任何额外的 = 标志。但是,您可以像这样执行其他脚本:
VARIABLE=$(basename $1) VARIABLE=`basename $1`
任何一个都有效。
在你的情况下,我不知道你在做什么,但它根本不对。我的猜测是你需要这样做:
env LD_LIBRARY_PATH=$(basename $1)