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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to get the value in last command line argument??? amit_oddey21 Shell Programming and Scripting 4 05-28-2008 08:40 AM
passing a command line argument rudoraj Shell Programming and Scripting 8 06-14-2007 12:06 AM
array as command line argument !!!! spandu UNIX for Dummies Questions & Answers 2 02-21-2006 01:33 PM
command line argument parsing rmjoe UNIX for Dummies Questions & Answers 1 07-28-2005 04:39 PM
Passing the command line argument in a variable rkumar28 Shell Programming and Scripting 1 05-26-2004 04:02 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-08-2008
sweta_doshi sweta_doshi is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 3
assign a command line argument and a unix command to awk variables

Hi ,

I have a piece of code ...wherein I need to assign the following ...
1) A command line argument to a variable
e.g origCount=ARGV[0]
2) A unix command to a variable
e.g result=`wc -l testFile.txt`

in my awk shell script

When I do this :
print "origCount" origCount --> I get the output as origCountawk
and I get a syntax error for 2)

Can you please help me with both

Thanks
SD

Last edited by jim mcnamara; 08-08-2008 at 08:23 AM.. Reason: Closed:homework
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0