Ver Fonte

jq: add 'output to string' example (#2916)

Bruno Bigras há 5 anos atrás
pai
commit
c24e2d610c
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      pages/common/jq.md

+ 4 - 0
pages/common/jq.md

@@ -29,3 +29,7 @@
 - Combine multiple filters:
 
 `cat {{file.json}} | jq 'unique | sort | reverse'`
+
+- Output the value of a given key to a string (and disable JSON output):
+
+`cat {{file.json}} | jq --raw-output '"some text: \(.{{key_name}})"'`