bufferRound=0;
while [[ $SECONDS -lt "scriptTTL" ]]; do
bufferTOD="$((SECONDS + bufferTTL))"; # Set buffer round time-of-death
- lineCount=0; # Debug counter
# Consume stdin to fill buffer until buffer time-of-death (TOD) arrives
while read -r -t "$bufferTTL" line && [[ $SECONDS -lt "$bufferTOD" ]]; do
# Append line to buffer array
buffer+=("$line");
- echo "DEBUG:Processing line:$lineCount";
- echo "DEBUG:Current line :$line";
- echo "DEBUG:buf elem count :${#buffer[@]}";
- ((lineCount++));
done;
# Create dir_tmp if missing
if ! [[ -d "$dir_tmp" ]]; then yell "ERROR:dir_tmp existence failure:$dir_tmp"; try mkdir "$dir_tmp" && vbm "DEBUG:Working dir recreated dir_tmp:$dir_tmp"; fi