Exercise 5
The simple shell that we used in Lab 1 is to be extended so that the user can run command pipelines such as:
ls | wc
The parser already recognizes | and the function pipecmd has been created for you. The only code you must write
is for the '|' case in runcmd. You might find the man pages for pipe, fork, close, and dup useful.
Test that you can run the above pipeline. The wc program may be in the directory /usr/bin/ and in that case
you can type the absolute pathname /usr/bin/wc to run word-count. The command which wc can help find
which directory in the shell's search path has an executable named wc. Make sure you use the right absolute
pathnames for the programs.
Now you should be able to run the command correctly by using absolute pathnames:
$ /usr/bin/ls | /usr/bin/wc -l
Note: I have got the code from previous exercise
Hi
I am certified Linux systems administrator, i can do this for you with time and fair pricing in mind but theirs one aspect of your explanation i did not get clearly. I hope you can explain to me more.