debugging aid. split dump output produced by replacement dump function in custom...
authorJason Etheridge <jason@esilibrary.com>
Mon, 23 May 2011 19:51:32 +0000 (15:51 -0400)
committerJason Etheridge <jason@esilibrary.com>
Thu, 26 May 2011 05:37:34 +0000 (01:37 -0400)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/external/dump_splitter.sh [new file with mode: 0755]

diff --git a/Open-ILS/xul/staff_client/external/dump_splitter.sh b/Open-ILS/xul/staff_client/external/dump_splitter.sh
new file mode 100755 (executable)
index 0000000..5f8eb27
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+# This can take a file containing output produced by the replacement dump function in custom.js.example
+# and break it into multiple files, one for each numeric dump prefix.  Not perfect, since it'll truncate
+# messages that aren't on one contiguous line.
+for x in `grep '>>>>>>>>>>>>>' $* | perl -ne 'if ( />>>> .. (\d+) =/ ) { print "$1\n"; }'` ; do
+grep $x $* > $x
+done
+grep '>>>>>>>>>>>>>' $*