I'm trying to run a shell script using Jenkins that gathers data from Facebook using multiple keywords. How do I make it so that the searches using the keywords include the apostrophes in the search?
The variable "${KEYWORDS}" is used as parameters passed to this script upon execution. It can be more than one keyword, separated by commas if there are multiple. The issue is that the script is not working for keywords with apostrophes i.e. "I'm" will not be able to run on this script. Only "Im".
"sed -ie 's/lms.facebook.keywords=.*\$/lms.facebook.keywords=${KEYWORDS}/g' /home/hdfs/lms-reporting/pipeline-lms-facebook.properties;
Can this be done in a simple way? Or does it require a complicated if-statement to parse out the keywords with & without apostrophes?
This can be done by manually escaping the keyword by changing the file in which it is pulling them from, however I need this feature to be implemented in the script.