From 93fb47050c80d20d668035c7d1b89d610c1aa7d8 Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 11 Oct 2003 03:58:19 +0000 Subject: B then wait. --- bin/Bwait | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 bin/Bwait (limited to 'bin') diff --git a/bin/Bwait b/bin/Bwait new file mode 100755 index 00000000..1c6ef96f --- /dev/null +++ b/bin/Bwait @@ -0,0 +1,17 @@ +#!/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 [ "$stat" eq "$nstat" ] + then + exit + fi +done + -- cgit v1.2.3