in reply to How to change a script's environment after the script is already run, based on shell sourcing ?
It seems to me the answers given so far are too complicated because everyone wants to write Perl where they don't need it. You want a shell script instead. Source the environment file to set up the environment, then start the Perl script.
#!/bin/sh source /etc/profiles/bashrc.ora.v.10 perl program.pl
And, if your Perl program is already running and the profile file has changed, you can exec the script again, effectively starting fresh.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to change a script's environment after the script is already run, based on shell sourcing ?
by Tanktalus (Canon) on Oct 13, 2006 at 03:28 UTC |