What is the LINUX/UNIX pipe? How is pipe different from output redirection? Give an example to illustrate your answer.
What will be an ideal response?
A LINUX/UNIX pipe allows you to connect the standard output of a command to the standard input of another command. Output redirection connects standard output of a command to a file. The following examples illustrate the difference. When the first command executes, the output of the ls -l command is given as input to the grep command. When the second command executes the output of the ls -l command is redirected to the sarwar.terminal file. If the sarwar.terminal file does not exist, it is created.
ls -l | grep “sarwar”
ls -l > sarwar.terminal
You might also like to view...
Organizing and summarizing data in a report can be accomplished by:
A) applying a theme. B) adding a page footer. C) grouping data. D) adding a calculated field.
The Ironman movies are ________ works based on the original Marvel Ironman comic books
Fill in the blank(s) with correct word