How to pass text string to CLI?

Hello,
My hardware is controlled via telnet or SSH CLI. I need to execute several commands from a file on FLASH0/.
Is there an easy way to pass a text string to CLI?

Take a look at the CLI code in sys. It has an api for adding comands. I am out of town right now or else I’d post some code. If you are still puzzled on Monday, let me know.

-Erik

I know how to add commands, but they are all invoked from the telnet client. I need to force the CLI to execute command from a string.
Well, I see the recurrency issue here. The CLI is calling my function in which I want to call the CLI with another command.
The most reliable would be to interpret the string internally. I am going this way…