streams/util/shredder
2016-01-21 12:22:54 +00:00
..
jansson-2.6.tar.gz You'll need these to build jshon - warning these are typically blocked by .gitignore 2014-06-18 17:19:44 -07:00
jshon.tar.gz You'll need these to build jshon - warning these are typically blocked by .gitignore 2014-06-18 17:19:44 -07:00
JSON.sh Type of script 2016-01-21 12:22:54 +00:00
OAuth.sh Turns out Linux has a shred command in /usr/bin and its purpose is to over-write files so we don't want to invoke it accidentally. So as not to cause confusion and issues we will rename ours to "shredder". Aussies are of course allowed to alias this to "shredda". 2014-06-18 17:04:19 -07:00
readme updated install doc 2015-02-20 13:18:44 -08:00
shredder first pass name change 2015-05-05 03:56:10 -07:00
ShredOAuth.sh Merge branch 'master' of https://github.com/redmatrix/redmatrix 2015-05-17 19:48:57 -07:00

http://kmkeen.com/jshon/



Jshon was made to be part of the usual text processing pipeline. However, every single -u is printed out to its own line. Most shell tools expect fields to be tab separated, and newlines between sets of fields. The paste tool does this. However, paste breaks down on blank lines so use sed to pad out the empty lines.

jshon ... | sed 's/^$/-/' |  paste -s -d "\t\t\n" | ....

The arguments need a little explaining.
-s is mysteriously needed for paste to correctly handle input.
-d is less obvious from the manpage, because it can take multiple characters which are looped through. The above example concatenates every three lines together.