1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

How to execute shell through C program

Discussion in 'C' started by pawarsac, Jul 13, 2006.

  1. pawarsac

    pawarsac New Member

    Joined:
    Jul 13, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello expert
    How to execute my own shell script through C program.
    waiting for reply..................

    sachin
     
  2. salichos

    salichos New Member

    Joined:
    Jul 25, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    check execl(), pipe() system calls.
     
  3. sumtaru

    sumtaru New Member

    Joined:
    May 17, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    You can execute like this :
    system("mysh");
    in unix operating system. mysh is the name of the shell script
     
  4. hRob

    hRob New Member

    Joined:
    May 18, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    in my experience, system() and execl() are the best ones to use. Make sure to raise their permissions before u execl them.
     

Share This Page