plan9fox/rc/bin/""

14 lines
227 B
Text
Raw Normal View History

2011-11-21 16:39:34 +00:00
#!/bin/rc
PROMPT='[^ ]*(%|;)+[ ]+'
2011-11-21 16:39:34 +00:00
_x = `{" $* | tail -1}
if(~ $#_x 0) {
echo no such command found
exit notfound
}
echo ' ' $_x
_x=`{ echo -n 'eval '''; echo $_x | sed 's/^'$PROMPT'//; s/''/''''/g; s/$/''/'}
2011-11-21 16:39:34 +00:00
rc -c $"_x