Linux Shell C programming

Discussion in 'C' started by flyspekc, Jul 18, 2008.

  1. flyspekc

    flyspekc New Member

    Joined:
    Jul 18, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello!

    I'm trying to code a simple linux shell in C. However I have some doubts.
    Per example, if I want to execute the following command: ls -al|more
    The line execl("/bin/ls", "/bin/ls", "-al|more", (char *) 0); returns an error.

    How can this be done?

    Thank you!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice