This repository has been archived on 2024-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
core/util/shredder
2018-05-12 09:58:19 -07: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 shebang portable 2018-05-12 09:58:19 -07:00
OAuth.sh shebang portable 2018-05-12 09:58:19 -07:00
readme updated install doc 2015-02-20 13:18:44 -08:00
shredder shebang portable 2018-05-12 09:58:19 -07:00
ShredOAuth.sh shebang portable 2018-05-12 09:58:19 -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.