2 # Desc: Writes stdin to disk every 5 minutes
4 yell
() { echo "[$(date --iso-8601=ns)]:$0: $*" >&2; } #o Yell, Die, Try Three-Fingered Claw technique
5 die
() { yell
"$*"; exit 111; } #o Ref/Attrib: https://stackoverflow.com/a/25515370
6 try
() { "$@" || die
"cannot $*"; } #o
10 yell
"Script started."
12 mapfile
-s4 -n5 buffer
14 yell
"Contents of buffer:${buffer[@]}";
16 for element
in "${buffer[@]}"; do
21 yell
"Script completed."