From 40c0da1cf20b28095ecee129f31ba08865b48d4e Mon Sep 17 00:00:00 2001 From: Lockszmith Date: Wed, 12 Jul 2023 00:53:28 -0400 Subject: [PATCH] Added NOHEAD=1 behavior to hide header from output --- tcdbinfo.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcdbinfo.sh b/tcdbinfo.sh index eaa4e9d..82115e9 100755 --- a/tcdbinfo.sh +++ b/tcdbinfo.sh @@ -137,6 +137,8 @@ JQ_COLS_REGEX="$( <<<"$JQ_COLS" \ jq -r '. | map ( ".\(.)" ) | join(",")' )" +[[ -z "$NOHEAD" ]] || JQ_COLS= + jqcode=' ['"${JQ_COLS^^}"'] + [.[] | ['"$JQ_COLS_REGEX"']