Skip to content

Instantly share code, notes, and snippets.

@sampollard
Created July 2, 2022 02:12
Show Gist options
  • Save sampollard/df8e5da97e5d67131c9d0c0406e89573 to your computer and use it in GitHub Desktop.
Save sampollard/df8e5da97e5d67131c9d0c0406e89573 to your computer and use it in GitHub Desktop.
Slowly spit out text, paragraph by paragraph
#!/bin/bash
FILE=conversation
LTIME=`stat -c %Z $FILE`
# Below is a Text width of 40
echo "========================================"
while true
do
ATIME=`stat -c %Z $FILE`
if [[ "$ATIME" != "$LTIME" ]]
then
timeout 1 aafire
clear
reset
awk 'BEGIN{RS=""} {a=$0} END{print a}' $FILE | pv -qL 16
LTIME="$ATIME"
fi
sleep 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment