I am writing a python script on Linux for twitter post using API, Is it possible to pass symbols like “(” “)” etc in clear text without apostrophes….
% ./twitterupdate this is me #works fine
% ./twitterupdate this is bad :(( #this leaves a error on bash.
Is the only alternative is to enclose the text into –> “” ?? like..
% ./twitterupdate "this is bad :((" #this will reduce the ease of use for the script
Is there any workaround?
Yes, quoting the string is the only way. Bash has its syntax and and some characters have special meaning. Btw, using “” is not enough, use apostrophes instead. Some characters will still get interpretted with normal quotation marks: