Results 1 to 3 of 3
Hi,
I have a bash script that constructs a few varieties of action commands that get executed at the same point. The action will be different depending on how these ...
- 04-18-2011 #1Just Joined!
- Join Date
- Apr 2011
- Posts
- 2
Query regarding eval
Hi,
I have a bash script that constructs a few varieties of action commands that get executed at the same point. The action will be different depending on how these commands got defined.
Unfortunately, I'm getting an error with one of them. Perhaps someone could help me out with this:
The offending line is this:
eval $ACTION
The ACTION variable is defined like this:
ALARM = '/usr/local/bin/finalize.sh INFO admin $MSG'
The error I get is "INFO not found". Could someone explain how I should be constructing this so that it evaluates in the way I'm looking for?
Regards,
Dave
- 04-18-2011 #2Linux Newbie
- Join Date
- Mar 2009
- Posts
- 228
I assume you mean:
ACTION='/usr/local/bin/finalize.sh INFO admin $MSG'
not ALARM.
eval $ACTION should work. I think your problem is in the finalize.sh script. Change the shebang line in that script to:
#!/bin/bash -vx
so you'll see the commands as they execute.
- 04-19-2011 #3Just Joined!
- Join Date
- Apr 2011
- Posts
- 2


Reply With Quote
