The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-28-2007
mohan705 mohan705 is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 134
serach file using awk

Hi,
I was able to print lines when search for specific string using awk but i want to print when search for two different strings using awk instead of doing two times (Print lines only contain "Insert Records and Insert into" not between lines)

Ex:
awk '/Insert Records./' a4.log

It displaying all lines strat with Insert Records
ex:

Insert records total:4
Insert records total:6
Insert records total:8

awk '/Insert into./' a4.log
ex:
Insert into t1
Insert into t2
Insert into t3

Thanks inadvance
Mohan