-BKSHUF_PARAM_LINEC=1000000;
-BKSHUF_PARAM_GSIZE=25 # lines per group for BKSHUF_PARAM_LINEC lines of input
+trap 'exit;' SIGPIPE; # exit early if stdout not being read
+
+# Load env vars
+## For these numbers of lines of input...
+if [[ ! -v BKSHUF_PARAM_LINEC ]]; then BKSHUF_PARAM_LINEC=1000000; fi;
+## ... target this group size.
+if [[ ! -v BKSHUF_PARAM_GSIZE ]]; then BKSHUF_PARAM_GSIZE=25; fi;