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:
This is roughly how I load the data:
File Layout:
Sample File Contents:
Thanks
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.
Wouldn't it be easier to use a cron job?
Quote:
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:
This is roughly how I load the data:
According to the contents you posted, the backticks are already there. Use eval to execute it:
Quote:
File Layout:
Sample File Contents:
Thanks
Depending on the cntents of $params, you may need to quote the expansion:
I've got my attributes evaluated, however I need to consider if multiple attributes are passed through, as a single string
Basically, I need to tokenize the parameters string
This is what I have so far:
Unfortunately, it isn't working
The attr array isn't being populated as I expected,
the entrie parameter string just gets assigned to the 1st index (index 0)
As for cronjobs, we're trying to get our scheduling in the DB.
- We want our schedules to be centralized
- Makes learning the timings of the batch easier
Last edited by GoldenEye4ever; 03-18-2009 at 01:50 AM..
Hi All,
Just have a requirement, I am executing a bash shell script, my requirement is to catch the pid and job name to a txt file in the same directory, is there anyway to do it? please help me out.
Regards
Rahul
---------- Post updated at 08:42 AM ---------- Previous update was at... (2 Replies)
Buddies, I am trying to copy the file 'xcopyq' from /home/sandip to /home/sandip/testdir using the below command and getting the error as shown below:-
sandip@manu:~$ find /home/sandip -type f -name '*xcopyq*' -exec cp{} /home/sandip/testdir/ \:
find: missing argument to `-exec'
Am I... (2 Replies)
Hi
When i m trying the boot the system with Primary HDD (c1t0d0s0) -- its solaris 10
I m getting an error "file just loaded does not appear to be executable".....So will anyone share the steps to recover from this stage
I also tried to build the corrupted superblock from below command but... (0 Replies)
Hi,
I am loading data in the database table through sqlldr. I have to find total records loaded from sqlldr log file and store it in a variable in my script. How do I get it?
Thank you. (3 Replies)
I need to write a script which checks for files loaded into a folder (files are loaded by ftp from other server) and process the file only if the file is loaded completely.
if the file is not complete in the current run, it must be processed in the next run.
Any suggestions would be welcome... (2 Replies)
When trying to find a list of files with specific text in them using
find . -type f -exec grep -l "DataStage Job 4263" {}\;
I get error
find: missing argument to 'exec'
How can I correct this ? I'm on Linux Red Hat.
Cheers
PS I'm a DataStage programmer not a systems support... (4 Replies)
Hello
i have DB file load with this command
../SS-Tools/SSdbload -r 10 -il /export/specbackup_db/$b y
i should wait until the DB load completed then run the next command
$SPECROOT/bin/launchinstdbapp `/usr/bin/hostname` SS n VNM.OUT
how this can be done with shell scripting
NB:
i... (1 Reply)
I am currently trying to find a way to loop through files in a given directory and for each file modify a ctl file and sql load it. I have been using the sed command to change the infile, badfile parameters of the control file. I have not yet tried to sql load it.
Requirement: files are ftp to... (1 Reply)
Here is the command in question for f in $(<uploads); do .
I only want this to execute if uploads is not empty. If uploads is empty I want the script to quit, actually before the for command. If its not apparent uploads is a text file.
Chris (3 Replies)
I have created get_list.bat file containing following line:
dir /B /O-d >file_list.txt
I am executing ftp command from Unix box and transferring get_list.bat file to windows server.
In my next ftp command I am trying to execute this test.bat file by entering this line:
get_list
or by... (9 Replies)