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"