-1

I have a linux command :

jq -r '."meta-version" |= "abc"' temp.json > folder1/folder2/abc.json

Which runs fine on the terminal, but I want to convert it into a python string and execute using a python script. I am getting error, how do I convert it into a python string For Example:

var = "jq -r '."meta-version" |= "abc"' temp.json > folder1/folder2/abc.json"

1 Answers1

0

try this:

var = "jq -r '.\"meta-version\" |= \"abc\"' temp.json > folder1/folder2/abc.json"
Karl Adler
  • 15,780
  • 10
  • 70
  • 88