The UNIX and Linux Forums  

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 -->
  #2 (permalink)  
Old 03-19-2009
Franklin52 Franklin52 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,314
Quote:
Originally Posted by saifurshaon View Post
Dear Conerned,
I am facing a situation where i need to pass an argument which is non-awk variable like

day=090319
awk '/TID:R/ && /TTIN:/' transaction.log

I want to add this day variable like below

awk '/TID:R$day/ && /TTIN:/' transaction.log


But it is not working.
Code:
 awk -v var=$day '$0 ~ "TID:R"var && /TTIN:/' transaction.log
Regards