Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    It sounds more like testing challenge, but it shouldn't be treated as applicable and practical example. I can present a solution, but the point is that you need to manage your input to not get into such fragile pipes Commented Dec 7, 2018 at 20:14
  • This is an example of a real world example. In this case there is no control over the input, for it is a complex pipe. Commented Dec 7, 2018 at 21:06
  • That set foo='{"mode":1}' looks like csh code, so the question would be what does it look like when there are single quotes or exclamation marks in the embedded JSON code. Would jq need to interpret the code as csh would? Commented Oct 21, 2024 at 6:29