i am writing a shell script test.sh inside which i am defining a json_str variable as
json_str='{"ecommerce": "master","app_compat":"master"}'
and i am passing this variable to a python script command - >
sudo python3 release.py $json_str
inside python script i am printing the value of input it is printing this
{"ecommerce":
not whole string. I can not change the input string as its coming from server which cant be changed. Solution of this is
json_str='{\"\ecommerce": \"\master",\"
\app_compat":\"\master"\}'
Can you suggest another method to do this as i cant change input string.
Inside python script
input_release=sys.argv[1]
print("here input %s" %input_release)
shell script
#!/usr/bin/env bash
echo "Inside bash script"
json_str='{"ecommerce": "master","app_compat":"master"}'
echo "$json_str"
sudo python3 release.py $json_str
sudo python3 release.py "$json_str"