#! bin/bash
#To print any non empty line if present
echo "enter a filename to print from awk"
read fileName
if [[ -f $fileName ]]
then
awk ' NF < 0 ' $fileName
echo "==============================================================="
else
echo "$fileName doesn't exist"
fi
#To print any non empty line if present
echo "enter a filename to print from awk"
read fileName
if [[ -f $fileName ]]
then
awk ' NF < 0 ' $fileName
echo "==============================================================="
else
echo "$fileName doesn't exist"
fi
[prabhucloudxlab@cxln4 ~]$ sh hello.sh
enter a filename to print from awk
filegrep.txt