tbe more careful about not executing self. clean up tmp files - plan9port - [fork] Plan 9 from user space (HTM) git clone git://src.adamsgaard.dk/plan9port (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit e9a569a96aa4b4b4f18a6d8ade511ee7812c30a6 (DIR) parent a19c44b83b96fefad131ef324c3eb2916e8c604c (HTM) Author: rsc <devnull@localhost> Date: Tue, 4 Jan 2005 21:12:17 +0000 be more careful about not executing self. clean up tmp files Diffstat: M bin/"" | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) --- (DIR) diff --git a/bin/"" b/bin/"" t@@ -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