plan9port/bin/Bwait

18 lines
243 B
Text
Raw Normal View History

2003-10-11 03:58:19 +00:00
#!/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 "$@"
while true
do
nstat=`ls -l $1`
if [ "x$stat" != "x$nstat" ]
2003-10-11 03:58:19 +00:00
then
exit
fi
done