From adca6b6992bad69c154a16e32c2450b5e98546fb Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 9 Jun 2014 17:43:50 -0500 Subject: [PATCH] Update to make shell quoting note appear on site --- manual/index.html | 4 ++++ sitemap.xml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/manual/index.html b/manual/index.html index d9595685..f18a7198 100644 --- a/manual/index.html +++ b/manual/index.html @@ -293,6 +293,10 @@ simpler:

Invoking jq

jq filters run on a stream of JSON data. The input to jq is parsed as a sequence of whitespace-separated JSON values which are passed through the provided filter one at a time. The output(s) of the filter are written to standard out, again as a sequence of whitespace-separated JSON data.

+

Note: it is important to mind the shell’s quoting rules. As a general rule it’s best to always quote (with single-quote characters) the jq program, as too many characters with special meaning to jq are also shell meta-characters. For example, jq +"foo" will fail on most Unix shells because that will be the same as jq foo, which will generally fail because foo is not +defined. When using the Windows command shell (cmd.exe) it’s best to use double quotes around your jq program when given on the command-line (instead of the -f program-file option), but then double-quotes in the jq program need backslash escaping.

+

You can affect how jq reads and writes its input and output using some command-line options: