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 > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 02-08-2008
varungupta varungupta is offline
Registered User
  
 

Join Date: Feb 2007
Location: Pune, Dehradun (INDIA), Michigan(US)
Posts: 206
Thumbs up

Quote:
Originally Posted by jim mcnamara View Post
awk does not know about pattern:
awk -v pattern=$pattern"

Use the -v option. Plus pattern is misspelled as "pettern".

Please use code tags when you post code.
hey,

Thanks for reply

Could you please tell me where i should mention -v option in awk, as awk is used twice in the code ? Now, how my script should look like ?
Thanks, I did notice the typo error for pattern. Thanks anyways.
And when i was running the above script then it given me error saying:Syntax error at line 11 : `(' is not expected.

Please tell me.

Last edited by varungupta; 02-08-2008 at 03:25 PM..