Skip to content

Instantly share code, notes, and snippets.

@chaoxu
Created April 25, 2010 02:37
Show Gist options
  • Save chaoxu/378115 to your computer and use it in GitHub Desktop.
Save chaoxu/378115 to your computer and use it in GitHub Desktop.
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