LAB 3

        EMT 2390L – Lab 3

For each of the following commands write a description of what it does and provide a screenshot with an example of its usage:

  • |
  • grep
  • head
  • tail
  • echo 
    Less Then
    The Less Then command is used as an input for a file or files.

    less then shows the output

    Greater Then
    The Greater Then command sign is used to as an output towards a file or files.

    greater then

    Vertical Bar
    The vertical bar character is used to represent a pipe in commands in Linux operating systems. A pipe is a form of redirection that is used to send the output of one program to another program for further processing.

     vertical bar

 Grep
Grep is a well made program that allows user to find text patterns within   files.In addition, when grep finds the pattern, it prints out the lines containing the part ten within it.

grep

 Head
Head is a command that prints out the first 10 line of a file. For example, in
this image it shows the words or the sentence that was input into the file.

    Head

Tail
The command tail is use to print out the last 10 lines of a file. In fact, if a
user only needed 3 lines to be printed out they could use the command
tail -n 3 abc.txt to print the last 3 lines of a file.


tail

Echo
The echo command is one of the most easy shell command because its
basically use to display a line of text. It’s use to help user write script
while working on the linux program.

echo

 

 

Leave a Reply

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