Default raw data was not being included in output file processing
since procStrings and procFileExts arrays were being completely
overwritten instead of being appended by argProcStrings array
assembled in magicParseProcessStrings() function.
# Script Metadata
scriptName="bklog"; # Define basename of script file.
# Script Metadata
scriptName="bklog"; # Define basename of script file.
-scriptVersion="0.1.15"; # Define version of script.
+scriptVersion="0.1.16"; # Define version of script.
scriptURL="https://gitlab.com/baltakatei/ninfacyzga-01"; # Define wesite hosting this script.
scriptTimeStart="$(date +%Y%m%dT%H%M%S.%N)"; # YYYYmmddTHHMMSS.NNNNNNNNN
scriptHostname=$(hostname); # Save hostname of system running this script.
scriptURL="https://gitlab.com/baltakatei/ninfacyzga-01"; # Define wesite hosting this script.
scriptTimeStart="$(date +%Y%m%dT%H%M%S.%N)"; # YYYYmmddTHHMMSS.NNNNNNNNN
scriptHostname=$(hostname); # Save hostname of system running this script.
# Validate input
## Validate argRawFileExt
if [[ "$argRawFileExt" =~ ^[.][[:alnum:]]*$ ]]; then
# Validate input
## Validate argRawFileExt
if [[ "$argRawFileExt" =~ ^[.][[:alnum:]]*$ ]]; then
- rawFileExt="$argRawFileExt";
+ rawFileExt="$argRawFileExt" && \
+ vbm "DEBUG :$fn:Set rawFileExt to \"$argRawFileExt\"";
+ else
+ vbm "DEBUG :$fn:Validation failure for $argRawFileExt . Not set to rawFileExt.";
fi;
# Add default stdin output file entries for procStrings, procFileExts
## Check if user specified that no raw stdin be saved.
if [[ ! "$optionNoStoreRaw" = "true" ]]; then
### T: --no-store-raw not set. Store raw. Append procStrings with cat.
fi;
# Add default stdin output file entries for procStrings, procFileExts
## Check if user specified that no raw stdin be saved.
if [[ ! "$optionNoStoreRaw" = "true" ]]; then
### T: --no-store-raw not set. Store raw. Append procStrings with cat.
+ vbm "DEBUG :$fn:--no-store-raw not set. Storing raw.";
#### Append procStrings array
#### Append procStrings array
+ procStrings+=("cat ") && \
+ vbm "DEBUG :$fn:Appended \"cat \" to procStrings";
+ vbm "DEBUG :$fn:procStrings array:${procStrings[*]}";
#### Check if --store-raw set.
if [[ "$optionStoreRaw" = "true" ]]; then
##### T: --store-raw set. Append procFileExts with user-specified file ext
#### Check if --store-raw set.
if [[ "$optionStoreRaw" = "true" ]]; then
##### T: --store-raw set. Append procFileExts with user-specified file ext
- procFileExts+=("$rawFileExt");
+ vbm "DEBUG :$fn:--store-raw set.";
+ procFileExts+=("$rawFileExt") && \
+ vbm "DEBUG :$fn:Appended $rawFileExt to procFileExts";
+ vbm "STATUS:$fn:procFileExts array:${procFileExts[*]}";
else
##### F: --store-raw not set. Append procFileExts with default ".stdin" file ext
###### Append procFileExts array
else
##### F: --store-raw not set. Append procFileExts with default ".stdin" file ext
###### Append procFileExts array
- procFileExts+=(".stdin");
+ procFileExts+=(".stdin") && \
+ vbm "DEBUG :$fn:Appended \".stdin\" to procFileExts";
+ vbm "STATUS:$fn:procFileExts array:${procFileExts[*]}";
fi;
else
### F: --no-store-raw set. Do not store raw.
#### Do not append procStrings or procFileExts arrays.
fi;
else
### F: --no-store-raw set. Do not store raw.
#### Do not append procStrings or procFileExts arrays.
+ vbm "STATUS:$fn:--no-store-raw set. Not storing raw.";
+ vbm "STATUS:$fn:procFileExts array:${procFileExts[*]}";
fi;
# Do nothing more if optionProcString not set to true.
fi;
# Do nothing more if optionProcString not set to true.
yell "ERROR:$fn:Illegal character '-' at start of process string element:\"$element\"";
exit 1; fi; done;
vbm "STATUS:$fn:Quick check shows argProcStrings and argProcFileExts appear to have valid contents.";
yell "ERROR:$fn:Illegal character '-' at start of process string element:\"$element\"";
exit 1; fi; done;
vbm "STATUS:$fn:Quick check shows argProcStrings and argProcFileExts appear to have valid contents.";
- procStrings=("${argProcStrings[@]}"); # Export process command strings
- procFileExts=("${argProcFileExts[@]}"); # Export process command strings
+ procStrings+=("${argProcStrings[@]}"); # Export process command strings
+ procFileExts+=("${argProcFileExts[@]}"); # Export process command strings
vbm "STATUS:$fn:Finished magicParseProcessStrings() function.";
} # Validate and save process strings and file extensions to arrays procStrings, procFileExts
magicParseRecipients() {
vbm "STATUS:$fn:Finished magicParseProcessStrings() function.";
} # Validate and save process strings and file extensions to arrays procStrings, procFileExts
magicParseRecipients() {