import E script from bell labs
This commit is contained in:
parent
dbe0a995f0
commit
029f07292b
1 changed files with 16 additions and 0 deletions
16
rc/bin/E
Executable file
16
rc/bin/E
Executable file
|
@ -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 ''
|
Loading…
Reference in a new issue