shithub: riscv

Download patch

ref: a284b5709106663cffc04dbee6318a780071ef79
parent: c4fdc6bfdb2211e13643d5fba75edf437c122eef
parent: 029f07292b6b2e4c6409ae7fd365808b0ed5f68f
author: glenda <[email protected]>
date: Tue Aug 25 05:35:48 EDT 2015

merge

--- /dev/null
+++ b/rc/bin/E
@@ -1,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 ''