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



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
command execution time hashin_p Shell Programming and Scripting 5 07-06-2008 07:28 PM
bash script execution with a variable in a single line shoeb Shell Programming and Scripting 1 07-06-2008 04:14 AM
command execution ?? zedex UNIX for Advanced & Expert Users 1 11-06-2007 05:26 PM
Where we can get the logs for a command execution successfully? susinthaa SUN Solaris 4 07-10-2007 12:35 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-07-2008
patelamit009 patelamit009 is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 17
Unhappy Execution of awk command in a variable

Hi All,

I have a awk command that is stored in a variable.

the value of the variable cmd is:
(mean output of echo $cmd is: )

awk -F";" '{print $1}'

Now I want to execute this command.

How can I do that????

Quick Reply will be appreciated.

Regards,
Amit
  #2 (permalink)  
Old 08-07-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
try
Code:
eval $variable
  #3 (permalink)  
Old 08-07-2008
patelamit009 patelamit009 is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 17
You are Great!

Its Working!
Closed Thread

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 05:02 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