From 6b402b83cffc97015345dab1c27c35afe64bb3db Mon Sep 17 00:00:00 2001 From: mischief Date: Tue, 25 Aug 2015 02:07:46 -0700 Subject: import E script from bell labs --- rc/bin/E | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 rc/bin/E (limited to 'rc/bin/E') diff --git a/rc/bin/E b/rc/bin/E new file mode 100755 index 000000000..e91d4f6a2 --- /dev/null +++ b/rc/bin/E @@ -0,0 +1,16 @@ +#!/bin/rc +# E file - B file, wait until it changes, exit +rfork e +if (! ~ $#* 1) { + echo usage: $0 file >[1=2] + exit usage +} +if (! test -e $1) { + echo $0: $1: no such file >[1=2] + exit no-file +} +otm = `{mtime $1 | awk '{print $1}'} +B $1 +while (~ $otm `{mtime $1 | awk '{print $1}'}) + sleep 1 +exit '' -- cgit v1.2.3