We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e1e332 commit 055144fCopy full SHA for 055144f
Bash/JSON_Parse_with_jq/README.md
@@ -0,0 +1,17 @@
1
+### json parsing in bash
2
+
3
+`find_flag.sh` sctipt will tell you how to use [jq](https://stedolan.github.io/jq/) command to parse JSON file in bash with an example (`sample.json`)
4
5
+The script will run below 3 commands and find the flag from the `sample.json` file
6
7
+```bash
8
+$ cat sample.json | jq "." | head -n 13
9
+```
10
11
12
+$ cat sample.json | jq ".data.allPosts.edges[0:3]"
13
14
15
16
+$ cat sample.json | jq ".data.allPosts.edges" | grep -E -o 'RotteN{.*}' | grep -v 'harder'
17
Bash/JSON_Parse_with_jq/find_flag.sh
100644
100755
0 commit comments