The UNIX and Linux Forums  

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




Thread: awk problem
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 06-29-2006
vish_indian vish_indian is offline
Registered User
  
 

Join Date: Jun 2006
Location: Delhi, India
Posts: 92
re: awk problem

This should work

cat <filename> | awk '$0!~/\*/{print}' > desired_file


All its doing is matching if '*' exists within a line. If it doesn't it prints the line. You can redirect the output to a file to get the desired lines.