I'm trying to execute the following line in Bourne:
LIST="-foo, -bar, baz"
However, I am getting an error:
-bar: c开发者_JAVA技巧ommand not found
Can anyone help me figure this out? Thanks!
This happens if the string is in fact not quoted.
Any chance you are doing LIST=$somevariable
instead of what you wrote in the question? Because then you should write LIST="$somevariable"
instead.
精彩评论