Search:

Type: Posts; User: strugglingman

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,345

    what is wrong with this simple problem

    What is wrong with the following code, there is no result ,just waiting, i do not know why that happens


    int main(void) {
    int pid, mypipe[2];
    if(pipe(mypipe) == -1) {
    ...
  2. I use the following code to do the pipe program...

    I use the following code to do the pipe program such as: ls | wc -w for only one "|", but if there are more "|", i do not know how to deal with it



    void pipeProcess(char *args1[], char...
  3. i could use execlp("ls","ls"NULL) to get the...

    i could use execlp("ls","ls"NULL) to get the result and it will output to the standard output, which is now redirected to one end of pipe, the other end is used to give input for wc -w, but if there...
  4. how could i write this program: cat < apa | wc | wc > bepa

    hi,

    i am a new programmer in linux programming, i want to write a program that demoes the function of shell, i just write some simple functions, for example, i have written
    ls | wc -w
    wc -l <...
Results 1 to 4 of 4