request
stringlengths
13
923
response
dict
Extract file members whose names end in .txt from backup's/bundle.zip into out'put/extracted, using skip behavior for existing files. Preserve directory names containing apostrophes.
{ "kind": "COMMAND", "value": "mkdir -p -- 'out'\"'\"'put/extracted'; unzip -Z1 'backup'\"'\"'s/bundle.zip' | awk '$0 !~ /\\/$/ && $0 ~ /\\.txt$/' | while IFS= read -r name; do unzip -q -n 'backup'\"'\"'s/bundle.zip' -d 'out'\"'\"'put/extracted' \"$name\" 2>/dev/null || :; done" }
List file members, excluding directory entries from backups/bundle.zip in archive order and print member names. Use ordinary directory names.
{ "kind": "COMMAND", "value": "unzip -Z1 backups/bundle.zip | awk '$0 !~ /\\/$/'" }
List file members, excluding directory entries from backup set/bundle.zip in archive order and print member names. Preserve directory names containing spaces.
{ "kind": "COMMAND", "value": "unzip -Z1 'backup set/bundle.zip' | awk '$0 !~ /\\/$/'" }
List file members, excluding directory entries from -backups/bundle.zip in archive order and print member names. Preserve directory names beginning with a dash.
{ "kind": "COMMAND", "value": "unzip -Z1 ./-backups/bundle.zip | awk '$0 !~ /\\/$/'" }
List file members, excluding directory entries from backup's/bundle.zip in archive order and print member names. Preserve directory names containing apostrophes.
{ "kind": "COMMAND", "value": "unzip -Z1 'backup'\"'\"'s/bundle.zip' | awk '$0 !~ /\\/$/'" }
List file members, excluding directory entries from backups/bundle.zip in archive order and print the member count. Use ordinary directory names.
{ "kind": "COMMAND", "value": "unzip -Z1 backups/bundle.zip | awk '$0 !~ /\\/$/' | wc -l | awk '{print $1}'" }
List file members, excluding directory entries from backup set/bundle.zip in archive order and print the member count. Preserve directory names containing spaces.
{ "kind": "COMMAND", "value": "unzip -Z1 'backup set/bundle.zip' | awk '$0 !~ /\\/$/' | wc -l | awk '{print $1}'" }
List file members, excluding directory entries from -backups/bundle.zip in archive order and print the member count. Preserve directory names beginning with a dash.
{ "kind": "COMMAND", "value": "unzip -Z1 ./-backups/bundle.zip | awk '$0 !~ /\\/$/' | wc -l | awk '{print $1}'" }
List file members, excluding directory entries from backup's/bundle.zip in archive order and print the member count. Preserve directory names containing apostrophes.
{ "kind": "COMMAND", "value": "unzip -Z1 'backup'\"'\"'s/bundle.zip' | awk '$0 !~ /\\/$/' | wc -l | awk '{print $1}'" }
List file members, excluding directory entries from backups/bundle.zip in sorted order and print member names. Use ordinary directory names.
{ "kind": "COMMAND", "value": "unzip -Z1 backups/bundle.zip | awk '$0 !~ /\\/$/' | LC_ALL=C sort" }
List file members, excluding directory entries from backup set/bundle.zip in sorted order and print member names. Preserve directory names containing spaces.
{ "kind": "COMMAND", "value": "unzip -Z1 'backup set/bundle.zip' | awk '$0 !~ /\\/$/' | LC_ALL=C sort" }
List file members, excluding directory entries from -backups/bundle.zip in sorted order and print member names. Preserve directory names beginning with a dash.
{ "kind": "COMMAND", "value": "unzip -Z1 ./-backups/bundle.zip | awk '$0 !~ /\\/$/' | LC_ALL=C sort" }
List file members, excluding directory entries from backup's/bundle.zip in sorted order and print member names. Preserve directory names containing apostrophes.
{ "kind": "COMMAND", "value": "unzip -Z1 'backup'\"'\"'s/bundle.zip' | awk '$0 !~ /\\/$/' | LC_ALL=C sort" }
Extract file members, excluding directory entries from backups/bundle.zip into output/extracted, using replace behavior for existing files. Use ordinary directory names.
{ "kind": "COMMAND", "value": "mkdir -p -- output/extracted; unzip -Z1 backups/bundle.zip | awk '$0 !~ /\\/$/' | while IFS= read -r name; do unzip -q -o backups/bundle.zip -d output/extracted \"$name\" 2>/dev/null || :; done" }
Extract file members, excluding directory entries from backup set/bundle.zip into result set/extracted, using replace behavior for existing files. Preserve directory names containing spaces.
{ "kind": "COMMAND", "value": "mkdir -p -- 'result set/extracted'; unzip -Z1 'backup set/bundle.zip' | awk '$0 !~ /\\/$/' | while IFS= read -r name; do unzip -q -o 'backup set/bundle.zip' -d 'result set/extracted' \"$name\" 2>/dev/null || :; done" }
Extract file members, excluding directory entries from -backups/bundle.zip into -output/extracted, using replace behavior for existing files. Preserve directory names beginning with a dash.
{ "kind": "COMMAND", "value": "mkdir -p -- -output/extracted; unzip -Z1 ./-backups/bundle.zip | awk '$0 !~ /\\/$/' | while IFS= read -r name; do unzip -q -o ./-backups/bundle.zip -d -output/extracted \"$name\" 2>/dev/null || :; done" }
Extract file members, excluding directory entries from backup's/bundle.zip into out'put/extracted, using replace behavior for existing files. Preserve directory names containing apostrophes.
{ "kind": "COMMAND", "value": "mkdir -p -- 'out'\"'\"'put/extracted'; unzip -Z1 'backup'\"'\"'s/bundle.zip' | awk '$0 !~ /\\/$/' | while IFS= read -r name; do unzip -q -o 'backup'\"'\"'s/bundle.zip' -d 'out'\"'\"'put/extracted' \"$name\" 2>/dev/null || :; done" }
Extract file members, excluding directory entries from backups/bundle.zip into output/extracted, using skip behavior for existing files. Use ordinary directory names.
{ "kind": "COMMAND", "value": "mkdir -p -- output/extracted; unzip -Z1 backups/bundle.zip | awk '$0 !~ /\\/$/' | while IFS= read -r name; do unzip -q -n backups/bundle.zip -d output/extracted \"$name\" 2>/dev/null || :; done" }
Extract file members, excluding directory entries from backup set/bundle.zip into result set/extracted, using skip behavior for existing files. Preserve directory names containing spaces.
{ "kind": "COMMAND", "value": "mkdir -p -- 'result set/extracted'; unzip -Z1 'backup set/bundle.zip' | awk '$0 !~ /\\/$/' | while IFS= read -r name; do unzip -q -n 'backup set/bundle.zip' -d 'result set/extracted' \"$name\" 2>/dev/null || :; done" }
Extract file members, excluding directory entries from -backups/bundle.zip into -output/extracted, using skip behavior for existing files. Preserve directory names beginning with a dash.
{ "kind": "COMMAND", "value": "mkdir -p -- -output/extracted; unzip -Z1 ./-backups/bundle.zip | awk '$0 !~ /\\/$/' | while IFS= read -r name; do unzip -q -n ./-backups/bundle.zip -d -output/extracted \"$name\" 2>/dev/null || :; done" }
Extract file members, excluding directory entries from backup's/bundle.zip into out'put/extracted, using skip behavior for existing files. Preserve directory names containing apostrophes.
{ "kind": "COMMAND", "value": "mkdir -p -- 'out'\"'\"'put/extracted'; unzip -Z1 'backup'\"'\"'s/bundle.zip' | awk '$0 !~ /\\/$/' | while IFS= read -r name; do unzip -q -n 'backup'\"'\"'s/bundle.zip' -d 'out'\"'\"'put/extracted' \"$name\" 2>/dev/null || :; done" }
Compress and decompress input/alpha.txt with gzip, write the recovered bytes to output/payload.out, then print its byte count. Use ordinary directory names.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; gzip -c -- input/alpha.txt > \"$tmp\"; gzip -cd -- \"$tmp\" > output/payload.out; wc -c < output/payload.out | awk '{print $1}'" }
Compress and decompress input set/alpha.txt with gzip, write the recovered bytes to result set/payload.out, then print its byte count. Preserve directory names containing spaces.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; gzip -c -- 'input set/alpha.txt' > \"$tmp\"; gzip -cd -- \"$tmp\" > 'result set/payload.out'; wc -c < 'result set/payload.out' | awk '{print $1}'" }
Compress and decompress -input/alpha.txt with gzip, write the recovered bytes to -output/payload.out, then print its byte count. Preserve directory names beginning with a dash.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; gzip -c -- -input/alpha.txt > \"$tmp\"; gzip -cd -- \"$tmp\" > -output/payload.out; wc -c < -output/payload.out | awk '{print $1}'" }
Compress and decompress in'put/alpha.txt with gzip, write the recovered bytes to out'put/payload.out, then print its byte count. Preserve directory names containing apostrophes.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; gzip -c -- 'in'\"'\"'put/alpha.txt' > \"$tmp\"; gzip -cd -- \"$tmp\" > 'out'\"'\"'put/payload.out'; wc -c < 'out'\"'\"'put/payload.out' | awk '{print $1}'" }
Compress and decompress input/alpha.txt with bzip2, write the recovered bytes to output/payload.out, then print its byte count. Use ordinary directory names.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; bzip2 -c -- input/alpha.txt > \"$tmp\"; bzip2 -cd -- \"$tmp\" > output/payload.out; wc -c < output/payload.out | awk '{print $1}'" }
Compress and decompress input set/alpha.txt with bzip2, write the recovered bytes to result set/payload.out, then print its byte count. Preserve directory names containing spaces.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; bzip2 -c -- 'input set/alpha.txt' > \"$tmp\"; bzip2 -cd -- \"$tmp\" > 'result set/payload.out'; wc -c < 'result set/payload.out' | awk '{print $1}'" }
Compress and decompress -input/alpha.txt with bzip2, write the recovered bytes to -output/payload.out, then print its byte count. Preserve directory names beginning with a dash.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; bzip2 -c -- -input/alpha.txt > \"$tmp\"; bzip2 -cd -- \"$tmp\" > -output/payload.out; wc -c < -output/payload.out | awk '{print $1}'" }
Compress and decompress in'put/alpha.txt with bzip2, write the recovered bytes to out'put/payload.out, then print its byte count. Preserve directory names containing apostrophes.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; bzip2 -c -- 'in'\"'\"'put/alpha.txt' > \"$tmp\"; bzip2 -cd -- \"$tmp\" > 'out'\"'\"'put/payload.out'; wc -c < 'out'\"'\"'put/payload.out' | awk '{print $1}'" }
Compress and decompress input/alpha.txt with xz, write the recovered bytes to output/payload.out, then print its byte count. Use ordinary directory names.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; xz -c -- input/alpha.txt > \"$tmp\"; xz -cd -- \"$tmp\" > output/payload.out; wc -c < output/payload.out | awk '{print $1}'" }
Compress and decompress input set/alpha.txt with xz, write the recovered bytes to result set/payload.out, then print its byte count. Preserve directory names containing spaces.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; xz -c -- 'input set/alpha.txt' > \"$tmp\"; xz -cd -- \"$tmp\" > 'result set/payload.out'; wc -c < 'result set/payload.out' | awk '{print $1}'" }
Compress and decompress -input/alpha.txt with xz, write the recovered bytes to -output/payload.out, then print its byte count. Preserve directory names beginning with a dash.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; xz -c -- -input/alpha.txt > \"$tmp\"; xz -cd -- \"$tmp\" > -output/payload.out; wc -c < -output/payload.out | awk '{print $1}'" }
Compress and decompress in'put/alpha.txt with xz, write the recovered bytes to out'put/payload.out, then print its byte count. Preserve directory names containing apostrophes.
{ "kind": "COMMAND", "value": "tmp=$(mktemp); trap 'rm -f \"$tmp\"' EXIT; xz -c -- 'in'\"'\"'put/alpha.txt' > \"$tmp\"; xz -cd -- \"$tmp\" > 'out'\"'\"'put/payload.out'; wc -c < 'out'\"'\"'put/payload.out' | awk '{print $1}'" }
Read the exact file `records.txt` and print only the first and last input lines.
{ "kind": "COMMAND", "value": "sed -n '1{p;d};$p' -- records.txt" }
Read the exact file `input set/records data.txt` and print only the first and last input lines.
{ "kind": "COMMAND", "value": "sed -n '1{p;d};$p' -- 'input set/records data.txt'" }
Read the exact file `-input/records.txt` and print only the first and last input lines.
{ "kind": "COMMAND", "value": "sed -n '1{p;d};$p' -- -input/records.txt" }
Read the exact file `in'put/records.txt` and print only the first and last input lines.
{ "kind": "COMMAND", "value": "sed -n '1{p;d};$p' -- 'in'\"'\"'put/records.txt'" }
Read the exact file `records.txt` and print each block beginning with an exact BEGIN line whose following word contains only ASCII letters, through its next exact END line.
{ "kind": "COMMAND", "value": "sed -n '/^BEGIN [A-Za-z][A-Za-z]*$/,/^END$/p' -- records.txt" }
Read the exact file `input set/records data.txt` and print each block beginning with an exact BEGIN line whose following word contains only ASCII letters, through its next exact END line.
{ "kind": "COMMAND", "value": "sed -n '/^BEGIN [A-Za-z][A-Za-z]*$/,/^END$/p' -- 'input set/records data.txt'" }
Read the exact file `-input/records.txt` and print each block beginning with an exact BEGIN line whose following word contains only ASCII letters, through its next exact END line.
{ "kind": "COMMAND", "value": "sed -n '/^BEGIN [A-Za-z][A-Za-z]*$/,/^END$/p' -- -input/records.txt" }
Read the exact file `in'put/records.txt` and print each block beginning with an exact BEGIN line whose following word contains only ASCII letters, through its next exact END line.
{ "kind": "COMMAND", "value": "sed -n '/^BEGIN [A-Za-z][A-Za-z]*$/,/^END$/p' -- 'in'\"'\"'put/records.txt'" }
Read the exact file `records.txt` and replace only the second lowercase x on each input line with uppercase X.
{ "kind": "COMMAND", "value": "sed 's|x|X|2' -- records.txt" }
Read the exact file `input set/records data.txt` and replace only the second lowercase x on each input line with uppercase X.
{ "kind": "COMMAND", "value": "sed 's|x|X|2' -- 'input set/records data.txt'" }
Read the exact file `-input/records.txt` and replace only the second lowercase x on each input line with uppercase X.
{ "kind": "COMMAND", "value": "sed 's|x|X|2' -- -input/records.txt" }
Read the exact file `in'put/records.txt` and replace only the second lowercase x on each input line with uppercase X.
{ "kind": "COMMAND", "value": "sed 's|x|X|2' -- 'in'\"'\"'put/records.txt'" }
Read the exact file `records.txt` and replace every case-insensitive error word with WARN.
{ "kind": "COMMAND", "value": "sed 's|\\<error\\>|WARN|gI' -- records.txt" }
Read the exact file `input set/records data.txt` and replace every case-insensitive error word with WARN.
{ "kind": "COMMAND", "value": "sed 's|\\<error\\>|WARN|gI' -- 'input set/records data.txt'" }
Read the exact file `-input/records.txt` and replace every case-insensitive error word with WARN.
{ "kind": "COMMAND", "value": "sed 's|\\<error\\>|WARN|gI' -- -input/records.txt" }
Read the exact file `in'put/records.txt` and replace every case-insensitive error word with WARN.
{ "kind": "COMMAND", "value": "sed 's|\\<error\\>|WARN|gI' -- 'in'\"'\"'put/records.txt'" }
Read the exact file `records.txt` and print only lines whose entire content is KEEP.
{ "kind": "COMMAND", "value": "sed -n '/^KEEP$/p' -- records.txt" }
Read the exact file `input set/records data.txt` and print only lines whose entire content is KEEP.
{ "kind": "COMMAND", "value": "sed -n '/^KEEP$/p' -- 'input set/records data.txt'" }
Read the exact file `-input/records.txt` and print only lines whose entire content is KEEP.
{ "kind": "COMMAND", "value": "sed -n '/^KEEP$/p' -- -input/records.txt" }
Read the exact file `in'put/records.txt` and print only lines whose entire content is KEEP.
{ "kind": "COMMAND", "value": "sed -n '/^KEEP$/p' -- 'in'\"'\"'put/records.txt'" }
Read the exact file `records.txt` and print all input lines in reverse order using hold and pattern space.
{ "kind": "COMMAND", "value": "sed -n '1!G;h;$p' -- records.txt" }
Read the exact file `input set/records data.txt` and print all input lines in reverse order using hold and pattern space.
{ "kind": "COMMAND", "value": "sed -n '1!G;h;$p' -- 'input set/records data.txt'" }
Read the exact file `-input/records.txt` and print all input lines in reverse order using hold and pattern space.
{ "kind": "COMMAND", "value": "sed -n '1!G;h;$p' -- -input/records.txt" }
Read the exact file `in'put/records.txt` and print all input lines in reverse order using hold and pattern space.
{ "kind": "COMMAND", "value": "sed -n '1!G;h;$p' -- 'in'\"'\"'put/records.txt'" }
Read the exact file `records.txt` and edit `records.txt` in place by changing every line beginning version= to version=2, leave `records.txt.bak` with the original bytes, and write no stdout.
{ "kind": "COMMAND", "value": "sed -i.bak 's/^version=.*/version=2/' -- records.txt" }
Read the exact file `input set/records data.txt` and edit `input set/records data.txt` in place by changing every line beginning version= to version=2, leave `input set/records data.txt.bak` with the original bytes, and write no stdout.
{ "kind": "COMMAND", "value": "sed -i.bak 's/^version=.*/version=2/' -- 'input set/records data.txt'" }
Read the exact file `-input/records.txt` and edit `-input/records.txt` in place by changing every line beginning version= to version=2, leave `-input/records.txt.bak` with the original bytes, and write no stdout.
{ "kind": "COMMAND", "value": "sed -i.bak 's/^version=.*/version=2/' -- -input/records.txt" }
Read the exact file `in'put/records.txt` and edit `in'put/records.txt` in place by changing every line beginning version= to version=2, leave `in'put/records.txt.bak` with the original bytes, and write no stdout.
{ "kind": "COMMAND", "value": "sed -i.bak 's/^version=.*/version=2/' -- 'in'\"'\"'put/records.txt'" }
Read the exact file `records.txt` and for each of `records.txt` and `second.txt`, prefix that file's first line with [first], process the files separately, and print the combined result.
{ "kind": "COMMAND", "value": "sed -s '1s/^/[first] /' -- records.txt second.txt" }
Read the exact file `input set/records data.txt` and for each of `input set/records data.txt` and `input set/second data.txt`, prefix that file's first line with [first], process the files separately, and print the combined result.
{ "kind": "COMMAND", "value": "sed -s '1s/^/[first] /' -- 'input set/records data.txt' 'input set/second data.txt'" }
Read the exact file `-input/records.txt` and for each of `-input/records.txt` and `-input/second.txt`, prefix that file's first line with [first], process the files separately, and print the combined result.
{ "kind": "COMMAND", "value": "sed -s '1s/^/[first] /' -- -input/records.txt -input/second.txt" }
Read the exact file `in'put/records.txt` and for each of `in'put/records.txt` and `in'put/second.txt`, prefix that file's first line with [first], process the files separately, and print the combined result.
{ "kind": "COMMAND", "value": "sed -s '1s/^/[first] /' -- 'in'\"'\"'put/records.txt' 'in'\"'\"'put/second.txt'" }
Print each record's `.name` value as JSON Lines. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c '.[] | .name' inputs/data.json" }
Print each nested `.profile.city` value, including null for missing cities. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c '.[] | .profile.city' inputs/data.json" }
Print each element of every record's .tags in JSON array inputs/data.json as a separate compact JSON value; skip absent or noniterable tags.
{ "kind": "COMMAND", "value": "jq -c '.[] | .tags[]?' inputs/data.json" }
Read the nested `meta.optional` value with `getpath`. Read the JSON object in `inputs/object.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'getpath([\"meta\",\"optional\"])' inputs/object.json" }
Report whether each record has a `secret` key. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'map(has(\"secret\"))' inputs/data.json" }
Keep records whose `active` value is true. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'map(select(.active == true))' inputs/data.json" }
Select active records and emit only their ids. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'map(select(.active == true)) | map(.id)' inputs/data.json" }
Project each record to id, name, and score. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'map({\"id\": .id, \"name\": .name, \"score\": .score})' inputs/data.json" }
For each record, retain only id, name, and score object entries. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'map(with_entries(select(.key | IN(\"id\",\"name\",\"score\"))))' inputs/data.json" }
For each record, keep id and name entries and rename them to key and label. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'map(with_entries(if .key | IN(\"id\",\"name\") then . | if .key == \"id\" then .key = \"key\" else . end | if .key == \"name\" then .key = \"label\" else . end else empty end))' inputs/data.json" }
Sort records by score and print their ids in jq order. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'sort_by(.score) | map(.id)' inputs/data.json" }
Sort records by descending score and print their ids. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'sort_by(.score) | reverse | map(.id)' inputs/data.json" }
Sort records lexically by name and print ids. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'sort_by(.name) | map(.id)' inputs/data.json" }
Keep the first record for each profile city and print its id. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'unique_by(.profile.city) | map(.id)' inputs/data.json" }
Group records by department and report count and score total. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'group_by(.dept) | map({key: .[0].dept, count: length, total: (map(.score // 0) | add)})' inputs/data.json" }
Convert the metadata object to key/value entries. Read the JSON object in `inputs/object.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c '.meta | to_entries' inputs/object.json" }
Emit each root-object value as JSON. Read the JSON object in `inputs/object.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c '.[]' inputs/object.json" }
Report the jq type of each score and nested city alongside the record id. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'map({id,score_type:(.score|type),city_type:(.profile.city|type)})' inputs/data.json" }
Render a readable report containing each id, department, and score. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq 'map({id,dept,score})' inputs/data.json" }
Use reduce to sum all non-null scores. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'reduce .[] as $r (0; . + ($r.score // 0))' inputs/data.json" }
Use reduce to count records by department, including null as a key. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'reduce .[] as $r ({}; .[($r.dept|tostring)] += 1)' inputs/data.json" }
Emit the running score total after each record. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'foreach .[] as $r (0; . + ($r.score // 0); .)' inputs/data.json" }
Define a jq function and label each record active or inactive. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'def status: if . then \"active\" else \"inactive\" end; map({id, label:(.active|status)})' inputs/data.json" }
Walk the tree and delete every `secret` key. Read the nested JSON tree in `inputs/tree.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'walk(if type == \"object\" then del(.secret) else . end)' inputs/tree.json" }
Delete the note key from every record. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'map(del(.note))' inputs/data.json" }
Delete the nested profile rank path from every record. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'map(delpaths([[\"profile\",\"rank\"]]))' inputs/data.json" }
Try converting each note to a number and keep the original on conversion errors. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'map(.note as $x | (try ($x | tonumber) catch $x))' inputs/data.json" }
Read raw lines with -R and print the length of each non-empty line. Read the raw comma-separated lines in `inputs/raw.txt`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -R 'select(length > 0) | length' inputs/raw.txt" }
Use --stream to emit the score leaf values and their paths. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq --stream -c 'select(length == 2 and .[0][-1] == \"score\")' inputs/data.json" }
Keep records tagged ops and emit their names. Read the JSON array in `inputs/data.json`. Preserve nulls and empty arrays.
{ "kind": "COMMAND", "value": "jq -c 'map(select((.tags | index(\"ops\")) != null) | .name)' inputs/data.json" }
Run jobs/job.sh in the background, wait for it, and print its exit status and one-line stdout with its final LF removed; store the capture only in a fresh mktemp directory named with prefix process-capture.XXXXXX and remove it before exit.
{ "kind": "COMMAND", "value": "tmpdir=$(mktemp -d -- ./process-capture.XXXXXX) || exit 1; trap 'rm -rf -- \"$tmpdir\"' EXIT; ./jobs/job.sh > \"$tmpdir/output\" & pid=$!; wait \"$pid\"; rc=$?; text=$(cat \"$tmpdir/output\"); printf 'exit=%s output=%s\\n' \"$rc\" \"$text\"" }
Run inputs/tasks/job.sh in the background, wait for it, and print its exit status and one-line stdout with its final LF removed; store the capture only in a fresh mktemp directory named with prefix process-capture.XXXXXX and remove it before exit.
{ "kind": "COMMAND", "value": "tmpdir=$(mktemp -d -- ./process-capture.XXXXXX) || exit 1; trap 'rm -rf -- \"$tmpdir\"' EXIT; ./inputs/tasks/job.sh > \"$tmpdir/output\" & pid=$!; wait \"$pid\"; rc=$?; text=$(cat \"$tmpdir/output\"); printf 'exit=%s output=%s\\n' \"$rc\" \"$text\"" }
Run 'work area/tasks/job.sh' in the background, wait for it, and print its exit status and one-line stdout with its final LF removed; store the capture only in a fresh mktemp directory named with prefix process-capture.XXXXXX and remove it before exit.
{ "kind": "COMMAND", "value": "tmpdir=$(mktemp -d -- ./process-capture.XXXXXX) || exit 1; trap 'rm -rf -- \"$tmpdir\"' EXIT; './work area/tasks/job.sh' > \"$tmpdir/output\" & pid=$!; wait \"$pid\"; rc=$?; text=$(cat \"$tmpdir/output\"); printf 'exit=%s output=%s\\n' \"$rc\" \"$text\"" }
Run -jobs/job.sh in the background, wait for it, and print its exit status and one-line stdout with its final LF removed; store the capture only in a fresh mktemp directory named with prefix process-capture.XXXXXX and remove it before exit.
{ "kind": "COMMAND", "value": "tmpdir=$(mktemp -d -- ./process-capture.XXXXXX) || exit 1; trap 'rm -rf -- \"$tmpdir\"' EXIT; ./-jobs/job.sh > \"$tmpdir/output\" & pid=$!; wait \"$pid\"; rc=$?; text=$(cat \"$tmpdir/output\"); printf 'exit=%s output=%s\\n' \"$rc\" \"$text\"" }
Run jobs/job.sh in the background, capture one-line stdout and stderr separately, wait for it, and print both streams with their final LFs removed and the exit status; use and remove a fresh mktemp directory named with prefix process-streams.XXXXXX.
{ "kind": "COMMAND", "value": "tmpdir=$(mktemp -d -- ./process-streams.XXXXXX) || exit 1; trap 'rm -rf -- \"$tmpdir\"' EXIT; ./jobs/job.sh > \"$tmpdir/stdout\" 2> \"$tmpdir/stderr\" & pid=$!; wait \"$pid\"; rc=$?; out=$(cat \"$tmpdir/stdout\"); err=$(cat \"$tmpdir/stderr\"); printf 'exit=%s stdout=%s stderr=%s\\n' ...