plan9port/bin/""
2005-01-11 20:58:13 +00:00

19 lines
300 B
Bash
Executable file

#!/usr/local/plan9/bin/rc
PROMPT='[^ ]*[%;$#][ ]+'
" $* |
grep -v '^'$PROMPT'""' |
tail -1 |
tee >{wc -l >/tmp/qq.$pid} |
tee /dev/stderr |
9 sed '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