The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to access values of awk/nawk variables outside the awk/nawk block? saniya Shell Programming and Scripting 5 05-13-2008 04:37 AM
How to use awk instead of nawk? kinmak UNIX for Dummies Questions & Answers 2 05-07-2008 01:34 AM
nawk & awk sd12 UNIX for Advanced & Expert Users 5 05-05-2008 07:46 AM
nawk/ksh help DeltaX Shell Programming and Scripting 0 03-06-2008 12:54 PM
nawk whatisthis Shell Programming and Scripting 3 09-29-2004 10:44 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-18-2007
Registered User
 

Join Date: Dec 2007
Posts: 57
nawk -v to awk

hi,

i have the command nawk -v i want to use it equivalent in awk?

any help please

Reply With Quote
Forum Sponsor
  #2  
Old 12-18-2007
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,029
awk -v var=value '.....' myFile
OR
# 'var' will not be available in the 'BEGIN' block
awk '.....' var=value myFile

Last edited by vgersh99; 12-18-2007 at 04:31 AM.
Reply With Quote
  #3  
Old 12-18-2007
Registered User
 

Join Date: Dec 2007
Posts: 57
thanks it works perfectly


happy new year
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:44 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0