How to send as many inputs as we have to the program using bash script? -
running arithmetic parser using bash script inside bash reading inputs using : $@ because every time can have different number of inputs. when send 1+1 can parse fine when send (1+1) error:
-bash: syntax error near unexpected token `1+1'
how can change able read parenthesis well?
note: parser works fine parenthesis.
quote arguments when calling bash script:
bash myscript.sh "(1+1)"
or escape special characters:
bash myscript.sh \(1+1\)
Comments
Post a Comment