plan9port/bin/""

20 lines
300 B
Text
Raw Normal View History

#!/usr/local/plan9/bin/rc
2004-10-17 04:02:55 +00:00
PROMPT='[^ ]*[%;$#][ ]+'
" $* |
grep -v '^'$PROMPT'""' |
tail -1 |
tee >{wc -l >/tmp/qq.$pid} |
tee /dev/stderr |
9 sed 's/^ '$PROMPT'//' |
rc
2004-10-17 04:02:55 +00:00
if(~ `{cat /tmp/qq.$pid} 0){
rm /tmp/qq.$pid
2004-10-17 04:02:55 +00:00
echo no such command found
exit notfound
}
rm /tmp/qq.$pid
2004-10-17 04:02:55 +00:00
exit 0