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.
while [[ $SECONDS -lt "scriptTTL" ]]; do
vbm "STATUS:$fn:Starting buffer round:$bufferRound";
bufferTOD="$(( (1+bufferRound)*bufferTTL ))" && vbm "DEBUG :$fn:bufferTOD:$bufferTOD"; # Set buffer round time-of-death
while [[ $SECONDS -lt "scriptTTL" ]]; do
vbm "STATUS:$fn:Starting buffer round:$bufferRound";
bufferTOD="$(( (1+bufferRound)*bufferTTL ))" && vbm "DEBUG :$fn:bufferTOD:$bufferTOD"; # Set buffer round time-of-death
# 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");
done;
# 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");
done;
timeBufferEndEpoch="$(date +%s)" && vbm "DEBUG :$fn:timeBufferEndEpoch:$timeBufferEndEpoch";
# Create dir_tmp if missing
if ! [[ -d "$dir_tmp" ]]; then
timeBufferEndEpoch="$(date +%s)" && vbm "DEBUG :$fn:timeBufferEndEpoch:$timeBufferEndEpoch";
# Create dir_tmp if missing
if ! [[ -d "$dir_tmp" ]]; then