#!/bin/sh stat=`stat -f "%m" "$1" 2>&1` B "$@" while sleep 0.2s; do nstat=`stat -f "%m" "$1" 2>&1` if [ "x$stat" != "x$nstat" ]; then exit; fi done