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