be more careful about not executing self.
clean up tmp files
This commit is contained in:
parent
a19c44b83b
commit
e9a569a96a
1 changed files with 10 additions and 1 deletions
11
bin/""
11
bin/""
|
|
@ -2,9 +2,18 @@
|
||||||
|
|
||||||
PROMPT='[^ ]*[%;$#][ ]+'
|
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){
|
if(~ `{cat /tmp/qq.$pid} 0){
|
||||||
|
rm /tmp/qq.$pid
|
||||||
echo no such command found
|
echo no such command found
|
||||||
exit notfound
|
exit notfound
|
||||||
}
|
}
|
||||||
|
rm /tmp/qq.$pid
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue