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
Executing scripts in Parallel itsme_maverick Shell Programming and Scripting 2 06-06-2008 12:23 PM
executing scripts by reading names from a file konark Shell Programming and Scripting 3 11-08-2007 02:28 AM
Variables in scripts kirkm76 UNIX for Dummies Questions & Answers 1 06-28-2007 04:47 PM
Executing Shell Scripts BuyoCat UNIX for Dummies Questions & Answers 1 09-07-2005 02:11 AM
executing perl scripts vtran4270 UNIX for Advanced & Expert Users 2 08-27-2002 03:28 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 Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-06-2003
zedmelon zedmelon is offline
Registered User
  
 

Join Date: Aug 2003
Location: under a rock
Posts: 3
executing variables in ksh scripts?

In a ksh script on an AIX box running a jillion oracle database processes, I'm setting a variable to one of two possible arguments, depending on cmd line arguments.

FINDIT="ps -ef | grep oracle | grep DBexport | grep rshrc"
-or-
FINDIT="ps -ef | grep oracle | grep prod | grep runback"

I want to have a way to execute the command list defined by the variable $FINDIT later in the script, putting the result in another variable. Any ideas how?

Things I have tried:
1. The straightforward RESULT=`$FINDIT`
(I get a usage on ps)

2. Putting the list in braces gives me bad substitution
FINDIT=${list}

3. exec is not on the system.

With either of the possible values of $FINDIT, if I execute them on the command line, there is no problem. What am I doing wrong?

Thanks,
-zedmelon
 

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 10:24 PM.


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