Thanks to visit codestin.com Credit goes to github.com
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 7a31f03 commit f49c07bCopy full SHA for f49c07b
json-split1.sh
@@ -0,0 +1,6 @@
1
+ http://stackoverflow.com/questions/1955505/parsing-json-with-unix-tools
2
+ cat filename.txt| sed -e 's/[{}]/''/g' | awk '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}'
3
+
4
+ Same code with a filter k="text" to show only fields with name "text" (but this filter is not working)
5
+ cat filename.txt | sed -e 's/[{}]/''/g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}'
6
0 commit comments