![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| waiting until file loaded | mogabr | Shell Programming and Scripting | 1 | 08-08-2008 11:24 AM |
| Help shell script to loop through files update ctl file to be sql loaded | dba_nh | Shell Programming and Scripting | 1 | 04-15-2008 09:00 PM |
| How can I make the for command check to see if a file is empty before executing? | chrchcol | Shell Programming and Scripting | 3 | 07-29-2006 04:14 AM |
| executing *.bat file on windows from Unix box via ftp command | alx | Shell Programming and Scripting | 9 | 01-29-2006 06:31 PM |
| executing dir or ls command via FTP | alx | Shell Programming and Scripting | 5 | 01-27-2006 06:13 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Help executing command loaded from file
I need to execute a command that is loaded from a file. Basically, we have several scripts that need to be run at scheduled times. We're going to store those times in the database and update a file with data. In that file we'll have scriptName, inputParameters, runTimes, etc... I chose to use tilda (~) as the delimiter as it can't be used by any of the input variables ![]() I got it all working, with one exception. If an inputParameter needs to be executed (current date `date +'%d%m'`) Then I get this error: Code:
./chk_master_script.sh[247]: `date +%m%d`: not found Launching script (with parameters): $HOME/daily/scripts/workit.sh This is roughly how I load the data: Code:
if [ -s ${masterDataFile} ]; then
fileExists=true
IFS="~"
while read workerScript parameters timingStuff; do
...
params=`${parameters}`
echo "Launching script (with parameters): ${workerScript} ${params}"
...
done
File Layout: Code:
filename~parameters~schedulingStuffHere Sample File Contents: Code:
workerScript.sh~`date '+%m%d'`~stuffGoesHere Thanks
|
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|