Hi
Im trying to run zip shell command from an Oracle job, but this has limitations.
This should take a few of explanaition,..
Oracle allows me to execute a command and then I can set up a fixed number of arguments. Ex: (summarizing in something like..):
JOB DEFINITION
job_name: test
job_action: /usr/bin/zip
job_arguments: 4
and then:
JOB test ARGUMENTS
ARGUMENT 1: -j
ARGUMENT 2: foo.zip
ARGUMENT 3: foo01
ARGUMENT 4: foo02
Then oracle execute "zip -j foo.zip foo01 foo02"
But the problem comes when I need an indetermined number of arguments, and cannot use spaces in arguments definitions.
So I was wondering in using something like
JOB DEFINITION
job_name: test
job_action: /bin/sh
job_arguments: 2
and then:
JOB test ARGUMENTS
ARGUMENT 1: -c
ARGUMENT 2: "/usr/bin/zip -j foo.zip foo01 foo02 andwhateverstringiwanttoconcattothis"
This *should* work, but, somehow, not
.
Then I've been wondering if I can write the arguments in a plain text file and then pass arguments from that file.
It must be something like..
$ cat filename-with-args-inside
-j foo.zip foo01 foo02
$ /usr/bin/zip [SHELLOPERATORORWHATEVER] filename-with-args-inside
Is this possible?
How it should be?
I have a lazy remember from my student past that in bash that you could do this with '<<<', like:
$ /usr/bin/zip <<<filename-with-args-inside
..But it doesnt work
Any idea?
Regards
Moderator's Comments:
|
|
Please use next time code tags for your code and data
|
|