AWK : print a file

 : '
Awk is mostly used for pattern scanning and processing. 
It searches one or more files to see if they contain lines that matches with the specified patterns and then perform the associated actions. 
Awk is abbreviated from the names of the developers – Aho, Weinberger, and Kernighan
$1’ represents the first word of that line, similarly ‘$2’ represents the second, ‘$3’ represents the third word
'


=====================================================================

[prabhucloudxlab@cxln4 ~]$ cat>hello.sh

#! /bin/bash
echo "enter a filename to print from awk"

read fileName
if [[ -f $fileName ]]
then
    awk '{print}' $fileName
else
    echo "$fileName doesn't exist"
fi



[prabhucloudxlab@cxln4 ~]$ sh hello.sh
enter a filename to print from awk
filegrep.txt

This is linux
This is windows
This is MAC
This is linux
This is windows
This is MAC
This is linux
This is windows
This is MAC
This is linux
This is windows
This is MAC
This is linux
This is windows
This is MAC
This is linux
This is windows
This is MAC
This is linux
This is windows
This is MAC
This is linux
This is windows
This is MAC