Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
clear + cat done every time a file changes
#!/bin/sh
T=0
while true; do
P=`stat -c %Y $1`
if [ "$T" -ne "$P" ];
then
T=$P
clear
cat $1
date
echo $'\a'
fi
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment