#!/bin/bash FILE=$1 ACTION=$2 LAST="" while [ 1 == 1 ] do NOW=`ls -l $FILE` if [ X"$NOW" != X"$LAST" ] then echo `date`: $ACTION $ACTION LAST=$NOW else echo -n . fi sleep 1 done