![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Include PERL script with in the unix shell script | ganapati | UNIX for Dummies Questions & Answers | 1 | 04-29-2008 09:18 AM |
| How to include RETURN KEY with Background process "&" in Shell Script | racbern | Shell Programming and Scripting | 1 | 03-11-2008 04:30 AM |
| how to include spreadsheet::ParseExcel in shell script | akash | Shell Programming and Scripting | 1 | 01-10-2008 08:17 AM |
| Need help on C-shell script program | haze21 | Shell Programming and Scripting | 1 | 11-14-2007 06:04 PM |
| shell script program | jayaram_miryabb | Filesystems, Disks and Memory | 1 | 03-09-2005 05:12 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
How to include shell script in C program
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
What do you mean by 'retrieve the task'?
|
|
#3
|
|||
|
|||
|
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
|
|
#4
|
||||
|
||||
|
So have you been able to execute the script remotely yet? You can do it via the system() call. Try something like this:
Code:
system("ssh -t user@remote sh /<remote>home/user/<file_name>.sh");
system("scp user@remote:/path/to/remote_file /path/to/local_file");
|
|
#5
|
|||
|
|||
|
thanks it works
|
|
#6
|
|||
|
|||
|
thanks for the info....
|
|||
| Google The UNIX and Linux Forums |