aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-04 21:12:17 +0000
committerrsc <devnull@localhost>2005-01-04 21:12:17 +0000
commite9a569a96aa4b4b4f18a6d8ade511ee7812c30a6 (patch)
tree233dab3b17b5088b44db9a9eb8c4d38e9210d6fe /bin
parenta19c44b83b96fefad131ef324c3eb2916e8c604c (diff)
downloadplan9port-e9a569a96aa4b4b4f18a6d8ade511ee7812c30a6.tar.gz
plan9port-e9a569a96aa4b4b4f18a6d8ade511ee7812c30a6.tar.bz2
plan9port-e9a569a96aa4b4b4f18a6d8ade511ee7812c30a6.zip
be more careful about not executing self.
clean up tmp files
Diffstat (limited to 'bin')
-rwxr-xr-xbin/""11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/"" b/bin/""
index 2b1f7444..ac5cda8b 100755
--- a/bin/""
+++ b/bin/""
@@ -2,9 +2,18 @@
PROMPT='[^ ]*[%;$#][ ]+'
-" $* | tail -1 | tee >{wc -l >/tmp/qq.$pid} | tee /dev/stderr | 9sed 's/^ '$PROMPT'//' | rc
+" $* |
+ grep -v '^'$PROMPT'""' |
+ tail -1 |
+ tee >{wc -l >/tmp/qq.$pid} |
+ tee /dev/stderr |
+ 9sed 's/^ '$PROMPT'//' |
+ rc
+
if(~ `{cat /tmp/qq.$pid} 0){
+ rm /tmp/qq.$pid
echo no such command found
exit notfound
}
+rm /tmp/qq.$pid
exit 0