Quote:
Originally Posted by Eisennheart
Use () instead of {}. Change ${OPTARGS} to $(OPTARGS).
|
I don't think that would accomplish what Red Squirrel's trying.
Parentheses are command substitution (replacing the contents of the parentheses with the output of a command) and curly braces are parameter substitution (replacing the content of the curly braces with the value of the variable).
It seems clear that Red Squirrel was trying to substitute a variable's value--so the curly braces look like the right decision.
Now, I know there's a C++ substitute, but I'm curious, what was the exact error displayed when trying to use the command as written? "Escaping" a character typically means adding a backslash to one or more characters to prevent the shell from treating it specially (like wildcards for instance). It would also be useful to see the script as a whole, or at least some context around the command.