![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Autosys | DILEEP410 | Shell Programming and Scripting | 1 | 06-11-2008 02:52 AM |
| question in AUTOSYS | arunkumar_mca | UNIX for Dummies Questions & Answers | 1 | 11-18-2007 03:33 AM |
| Documentation and books on Autosys Job Control Tool from Autosys | gram77 | UNIX for Advanced & Expert Users | 0 | 11-10-2007 03:24 AM |
| About autosys | btech_raju | UNIX for Dummies Questions & Answers | 1 | 11-05-2007 01:42 PM |
| AutoSys (updating global variable) | mik357 | UNIX for Advanced & Expert Users | 1 | 06-13-2007 06:25 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Autosys variable
Hi All,
I need to load a file which has a date in the name. Sort of like this: filename.20080619.dat I created an autosys variable that has that date as the value 20080619 which name is DATEVAR When I use that variable in the 'command' part of the job, I need to append the ".dat" next to the variable like: command: load.sh filename.$$DATEVAR.dat What happens? Autosys thinks my variable name is DATEVAR.dat and not DATEVAR, so the command calls the worng file name. My question is, how do I append a text at the end of the variable? Separate the variable with quotes? double quotes? There is a quick workaround which is adding the .dat at the end of the value, so the variable would be DATEVAR=20080619.dat , but I want to do it the other way. Thanks, Fabian |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You need curly braces:
Code:
DATEVAR="20080619"
echo "filename.${DATEVAR}.dat"
|
|
#3
|
|||
|
|||
|
Have in mind this is not an environment variable, this is an Autosys variable, created with the sendevent command. Do the curly braces work anyway?
|
|
#4
|
||||
|
||||
|
Nah, sorry, I've misread your request, ignore my post!
Unfortunately I don't even know what is Autosys |
|
#5
|
|||
|
|||
|
So anyone knows what I'm talking about?
|
|
#6
|
|||
|
|||
|
I work with Autosys on a daily basis. In order for variables to work on the command line in Autosys, you have to 1st pass them off as global variables (gv). Once you pass them off as a gv, it will no longer take it as a literal and your problem will be solved.
|
|
#7
|
|||
|
|||
|
You mean this?
sendevent -E SET_GLOBAL -G DATEVAR=20060617 I already did that. Now, how do I append a string at the end of the "calling" of the variable? If I do this command: touch filename.$$DATEVAR.tag autosys will think the name of the variable is DATEVAR.tag I want to add text at the end of the variable so that I can construct a name ... like an email, for instance: sendevent -E SET_GLOBAL -G NAME=fabian sendevent -E SET_GLOBAL -G SERVER=@unixforums.com how to I call those variables together in job so that the result is fabian@unixforums.com Thanks Fabian |
|||
| Google The UNIX and Linux Forums |
| Tags |
| autosys |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|