hi
I want to call a shell script in C program
the script is : ssh -t user@remote sh /<remote>home/user/<file_name>.sh
and other several commands
C program : Call this script and the retrive the task that is been done in <file_name>.sh file
can any one tell me how to call the script
thankx
What do you mean by 'retrieve the task'?
i am retriving some file that are generated by the shell script <which is running on remote machine> to my own machine from where i am executing the .c file
So have you been able to execute the script remotely yet? You can do it via the system() call. Try something like this:
system("ssh -t user@remote sh /<remote>home/user/<file_name>.sh");
system("scp user@remote:/path/to/remote_file /path/to/local_file");
If you are being allowed to use system(), then that's all that is there to it. If not, you will have to fork and exec.