1 Replies - 781 Views - Last Post: 12 July 2012 - 08:44 AM Rate Topic: -----

#1 Luckless  Icon User is offline

  • </luck>
  • member icon

Reputation: 293
  • View blog
  • Posts: 1,146
  • Joined: 31-August 09

Korn Environment Variables

Posted 12 July 2012 - 08:28 AM

I have no idea where to post this, but here looked like a good choice. So, I'm working with Hudson. For those of you who don't know, it's a job manager that can manage just about any project with the use of Shell scripts and cron. So, for one of my applications, I need to pass an environmental variable 'spring.profiles.active'. It works great in eclipse where it doesn't matter, but Hudson uses a Korn shell which doesn't like periods in the env var name. Anybody know a workaround? I know this is kinda obscure, but I'm not an expert in shell scripting. To avert extra questions, it MUST be named this and can't be changed.

Is This A Good Question/Topic? 0
  • +

Replies To: Korn Environment Variables

#2 GWatt  Icon User is offline

  • member icon

Reputation: 305
  • View blog
  • Posts: 3,102
  • Joined: 01-December 05

Re: Korn Environment Variables

Posted 12 July 2012 - 08:44 AM

I don't believe most *nix shells support having periods in the variable name. Why can't this variable be changed?

Actually, with some playing around I discovered that you can set and environment variable with the env command before you run a process.
env spring.profiles.active=some.value program_to_run

This post has been edited by GWatt: 12 July 2012 - 09:11 AM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1