The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-19-2008
Registered User
 

Join Date: Jul 2006
Posts: 4
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
Reply With Quote
Forum Sponsor
  #2  
Old 06-19-2008
robotronic's Avatar
Can I play with madness?
 

Join Date: Apr 2002
Location: Italy
Posts: 370
You need curly braces:

Code:
DATEVAR="20080619"
echo "filename.${DATEVAR}.dat"
Reply With Quote
  #3  
Old 06-19-2008
Registered User
 

Join Date: Jul 2006
Posts: 4
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?
Reply With Quote
  #4  
Old 06-19-2008
robotronic's Avatar
Can I play with madness?
 

Join Date: Apr 2002
Location: Italy
Posts: 370
Nah, sorry, I've misread your request, ignore my post!
Unfortunately I don't even know what is Autosys
Reply With Quote
  #5  
Old 06-25-2008
Registered User
 

Join Date: Jul 2006
Posts: 4
So anyone knows what I'm talking about?
Reply With Quote
  #6  
Old 06-27-2008
Registered User
 

Join Date: Jul 2007
Posts: 2
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.
Reply With Quote
  #7  
Old 06-27-2008
Registered User
 

Join Date: Jul 2006
Posts: 4
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
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
autosys

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 01:33 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0