[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can use variable as parameter in paths and arguments of jobs. To replace a variable by its value, you just have to enclose a variable name with `$<' and `>'.
$ dio87d -d $ dio87d -d $ dio87d -d $ dio87d -d $ dio87c ra ref1 $ dio87c rta ref1 task1 $ dio87c rtoa ref1 task1 add always $ |
We create three variables `arg1', `arg2' and `prefix'. Then we create a job `job1'. We use `$<...>' to replace variable by its value. `$<arg1>' will be replaced by `val1', `arg2' by `val2' and `$<prefix>' by `/usr/local'.
$ dio87c va arg1 val1 $ dio87c va arg2 val3 $ dio87c va prefix "/usr/local" $ $ dio87c rja ref1 task1 job1 $ dio87c rjsa ref1 task1 job1 "$<arg1> $<arg2> $<xxx>" $ dio87c rjsp ref1 task1 job1 "$<prefix>/bin/ls" $ |
Now, we create a new day `d1' and print job information to verify that `$<...>' occurences are replaced by variable values :
$ dio87c rp ref1 "2004-03-19" d1 $ $ dio87c xji d1 task1 job1 Job Name: job1 Task Name: task1 [...] Path: /usr/local/bin/ls Argument: val1 val3 $<xxx> [...] $ |
You can see that `$<xxx>' is not replaced by a value, because `xxx' is not a variable in `dio87d'. But if you create a variable named `xxx' in `dio87d', it will by replaced by value when job is launched !