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.
我正在尝试在 Bourne 中执行以下行:
LIST="-foo, -bar, baz"
但是,我收到一个错误:
-bar:找不到命令
谁能帮我解决这个问题?谢谢!
如果字符串实际上没有被引用,就会发生这种情况。
你有没有机会做LIST=$somevariable而不是你在问题中写的?因为那你应该改写LIST="$somevariable"。
LIST=$somevariable
LIST="$somevariable"