From: Steven Baltakatei Sandoval Date: Sat, 11 Jul 2020 04:10:40 +0000 (+0000) Subject: fix(bklog):Fix boolean '-' test in magicParseProcessStrings() X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02.git/commitdiff_plain/61b243e02e1f931475cee6af954b2969f6276e42?ds=inline fix(bklog):Fix boolean '-' test in magicParseProcessStrings() --- diff --git a/exec/bklog b/exec/bklog index 7dff30d..52f6eb1 100644 --- a/exec/bklog +++ b/exec/bklog @@ -859,7 +859,7 @@ magicParseProcessStrings() { if [[ -z "$element" ]]; then yell "ERROR:Empty output file extension specified. Exiting."; exit 1; fi; done ## Make sure that no process string starts with '-' (ex: if only one arg supplied after '-p' option) for element in "${argProcStrings[@]}"; do - if [[ ! "$element" =~ ^[-][[:print:]]*$ ]] && [[ "$element" =~ ^[[:print:]]*$ ]]; then + if [[ "$element" =~ ^[-][[:print:]]*$ ]] && [[ ! "$element" =~ ^[[:print:]]*$ ]]; then yell "ERROR:Illegal character '-' at start of process string element:\"$element\""; exit 1; fi; done; vbm "STATUS:Quick check shows argProcStrings and argProcFileExts appear to have valid contents.";