#! /bin/sh n=0 echo "n date/time file mtime" while true do date '+%s' >junk$n echo $n' '`cat junk$n`' '`ftimes junk$n` sleep 1 n=$[n+1] done