diff master/bin/shrinkJSON.sh @ 13:bba589cab837

shrinkJSON.sh: minimise "jq ." output test1.sh: fix lrand regression [_]findPDFs.sh: extract responses with application/pdf Content-Type
author Henry S. Thompson <ht@markup.co.uk>
date Fri, 12 Oct 2018 08:51:50 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/master/bin/shrinkJSON.sh	Fri Oct 12 08:51:50 2018 +0000
@@ -0,0 +1,3 @@
+#!/bin/bash
+# Shrink json output from worker to remove unnecessary characters
+egrep -v '^#' $1| jq  .  |sed 's/^  *//;s/^"\([-0-9A-Za-z]*\)": "\?/\1:/;s/"\?,\?$//'