How to execute shell through C program

pawarsac's Avatar, Join Date: Jul 2006
Newbie Member
Hello expert
How to execute my own shell script through C program.
waiting for reply..................

sachin
0
salichos's Avatar, Join Date: Jul 2006
Newbie Member
check execl(), pipe() system calls.
0
sumtaru's Avatar, Join Date: May 2012
Light Poster
You can execute like this :
system("mysh");
in unix operating system. mysh is the name of the shell script
0
hRob's Avatar, Join Date: May 2012
Newbie Member
in my experience, system() and execl() are the best ones to use. Make sure to raise their permissions before u execl them.