Reputation: 7461
I have made a node application that take any text as argument and my application takes that text and stores that in the database.
When I am giving any text that contain the ( or ) in it then I get an error from bash as
-bash: syntax error near unexpected token `('
How can i accept arguments which contain ( or ) in the text
Upvotes: 0
Views: 66
Reputation: 203304
Quote the argument(s), preferably using single quotes:
node app.js 'foo ( or ) bar'
Upvotes: 2