aboutsummaryrefslogtreecommitdiff
path: root/bin/E
blob: 8d26261244361d4326288003aca9b941866aa39d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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