Command line execution error: unexpected EOF while looking for matching `"' bash: -c: line 25: syntax error: unexpected end of file
Hello All,
i am trying to execute below command in linux but it is failing with unexpected EOF while looking for matching `"' bash: -c: line 25: syntax error: unexpected end of file as i have a single quote in one of the fields of Json string. I tried escaping it by finishing already opened one ('), placing quote in another quote ("'"), then opening another one (') like "delivery_name":"UU'"'"'18 JUS OFI 159" and "delivery_name":"UU'\''18 JUS OFI 159".
When i escape it as above i am able to execute the command but the input to the R script is going as delivery_name` = 'UU\\'18 JUS OFI 159' so the query is not returning data. Can some one please help i am new to linux.
/usr/lib64/R/bin/Rscript /ap_data/D2O/BCI/scripts/ci_automation.R '{ "project_id":"828", "version_id":"2", "query_id":null, "country":"dz", "deliverable":"159JUS", "client_db_id":19631, "delivery_name":"UU'18 JUS OFI 159", "subtype":"trend", "mkt_tag":"A4", "prod_tag":[ "T00000001", "T00000025" ], "fact":[ "sales_volume", "sales_value", "distribution_numeric" ], "expectation":"decrease", "current_period":"NOV 2017", "reference_period":null, "scope":"ytd", "analysis_type":"market_analysis" }'
|