1 parent
3ae8fb7371
commit
b0aa62f2b7
2 files changed
+17
No files matched your search
@@ -81,6 +81,12 @@ task :manpage do
|
||||
f.puts "### #{entry['title']}\n"
|
||||
f.puts entry['body']
|
||||
f.puts ""
|
||||
(entry['examples'] || []).each do |example|
|
||||
f.puts " jq '#{example['program']}'"
|
||||
f.puts " #{example['input']}"
|
||||
f.puts " => #{example['output'].join(", ")}"
|
||||
f.puts
|
||||
end
|
||||
end
|
||||
f.puts ""
|
||||
end
|
||||
|
||||
@@ -35,6 +35,17 @@ manpage_intro: |
|
||||
|
||||
`jq` [<options>...] <filter>
|
||||
|
||||
`jq` can transform JSON in various ways, by selecting, iterating,
|
||||
reducing and otherwise mangling JSON documents. For instance,
|
||||
running the command `jq 'map(.price) | add'` will take an array of
|
||||
JSON objects as input and return the sum of their "price" fields.
|
||||
|
||||
The <options> are described in the [INVOKING JQ] section, they
|
||||
mostly concern input and output formatting. The <filter> is written
|
||||
in the jq language and specifies how to transform the input
|
||||
document.
|
||||
|
||||
## FILTERS
|
||||
|
||||
sections:
|
||||
- title: Invoking jq
|
||||
|
||||
Reference in new issue
Block a user