Created
April 25, 2010 02:37
-
-
Save chaoxu/378115 to your computer and use it in GitHub Desktop.
clear + cat done every time a file changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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