command line arguments containing (
I'd like to pass a string that contains brackets '(' as a command line argument to a script, like e.g.
Code:
$ calc f(x) bash: syntax error near unexpected token `(' I know that I can use '\(', but this can become quite cumbersome when using many brackets. Is there a better way? |
wrap the arguments in quotes?
Code:
calc "f(x)" |
Ofcourse, if it is the result of the calc statement that you wanted passed as an argument to another command, you could wrap the whole thing in left-hand quotes:
Code:
$ newcommand `calc f(x)` |
si the calc function expecting a string similar to "f(x)"? If so, then simply use the parantheses.
Otherwise, let us know what calc expects..... |
All times are GMT -5. The time now is 04:20 PM. |