Question: tee is a Linux shell command that will take the output of a command and route it into a stdout AS WELL AS to multiple

"tee" is a Linux shell command that will take the output of a command and route it into a stdout AS WELL AS to multiple files or commands. For example: cat file.txt | tee > (do_stuff1_to_cat_output) > (do_stuff2_to_cat_output) > (do_stuff2_to_cat_output). For the third assignment, you are implementing your own shell: mysh. Write a pseudo-code implementation of this command as if you would be implementing it as a part of the assignment 3. for your sell (mysh). Use kernel pipes, dup, dup2 system calls to accomplish this. Let's say your code will implement new operator "||" that will pipe an output of a proceeding command to stdout and any number of commands afterwards separated by multiple ">". For example: $ echo "this is my text" || grep this > grep my > wc-c Here text "this is my text" will be echo-ed on stdout and it is also used by grep as its input to do "grep this" and "grep my" and "wc-c" (wordcount command) the output should be:

___________________________________

$ this is my text

$ this is my text

$ this is my text

$16

___________________________________

a.) Write pseudo-code for handing "||" with two commands following the special character "||"

b.) Generalize the command for any number of commands following the special character "||"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!