The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: Help with awk
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 08-19-2008
palsevlohit_123 palsevlohit_123 is offline
Registered User
  
 

Join Date: Aug 2008
Location: India-Chennai
Posts: 120
while read line
do
curr=`echo $line |grep -i "vg"|wc -l|awk '{print $1}'`
if [ "$curr" = "1" ]
then
echo "\n$line\c"
else
echo ":$line\c"
fi
done < your_file_here