Plan 9 from User Space's /usr/local/plan9/bin/E

#!/bin/sh

# run B but then wait for the file to change.
# great to set as $EDITOR.
# the notion of a file changing is a little weak.

stat=`ls -l $1`
B "$@"
echo editing "$@"
while sleep 1
do
	nstat=`ls -l $1`
	if [ "x$stat" != "x$nstat" ]
	then
		exit
	fi
done


Space Glenda

Copyright © 2005 Lucent Technologies, Russ Cox, MIT.
See license for details.