Any idea how to make the output pipe-able? Eg:

echo '{"value": "New", "onclick": "CreateNewDoc()"}' | jq

works well and, as expected, I get:

{
  "value": "New",
  "onclick": "CreateNewDoc()"
}

But I can't pipe that output to anything else and if I do:

echo '{"value": "New", "onclick": "CreateNewDoc()"}' | jq | grep value

this just errors out printing the tool usage guidelines.

On Friday, December 8, 2017 at 2:00:11 PM UTC-7, Tom McKay wrote:
>
> @daviddavis reminded me of a nice utility I learned about recently: jq[1]. 
> I use it quite often in scripts involving container images where I need the 
> long sha256 to reference them.
>
> sudo skopeo inspect --raw docker-daemon:
> satellite.example.com:5000/examplecorp-docker_hub-alpine:3.4 | jq 
> '.config | .digest'
>
> Enjoy!
>
> [1] https://stedolan.github.io/jq/tutorial/
>

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to