plan9port/bin/""
2005-01-04 21:12:17 +00:00

19 lines
299 B
Bash
Executable file

#!/usr/local/plan9/bin/rc
PROMPT='[^ ]*[%;$#][ ]+'
" $* |
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