02-06-2003 02:08 AM
Is it possible to run telnet commands from a C program.
I know that there is a well known piece of freeware called expect that will do this and a module in perl that can also do this, but has anyone done in C and could you provide a small example.
Solved! Go to Solution.
02-06-2003 02:30 AM
There are public domain examples
02-06-2003 04:31 AM
It is no difficult. Look at "man" of
functions: execve,execv, execl, execle
Here is simple example of
C-source of executing command "whoami":
02-06-2003 05:06 AM
The easiest way to execute a shell-command is to use standard library routine "system".
It takes only 1 argument:
stat = system("date")
/* another rows ...... */