Lab 3

Command >: stdout redirection
This command is used to redirect other command’s output as another file. Example below shows that using the > command, the result of other command is created and displayed on a text file as set instead, instead of appearing in the terminal.
stdout

Command <: stdin redirection
This command helps other commands redirect into the input. Example below uses < command to filter all the letter r inside the document.
stdin

Command |: Pipeline
This command | is used for executing multiple commands at once. Example below shows the function of | command by copying into two document typed in a single line command.
pipeline

Command grep:
The command grep finds all the file’s text based on patterns. Example below grep filters all the other text out and only showing text with desired word or letter combination.
grep

Command head:
This command displays the first 10 lines of the text in a file.
head

Command tail:
This command displays the last 10 lines of the next in a file.
tail

Command echo:
This command displays the line of text on terminal. Example below uses echo to do simple math problem.
echo

Leave a Reply

Your email address will not be published. Required fields are marked *

A City Tech OpenLab ePortfolio