This has gotten out of hand, I think. The OP wanted to run a perl
script in a custom environment set in a bash script, and we went off
on a tangent in the direction of something quite general.
This is a very good example of how an attempt to create a general,
portable, robust solution for
On Fri, Oct 02, 2009 at 08:59:37AM +0200, Noam Meltzer wrote:
On Thu, Oct 1, 2009 at 12:57 PM, Tzafrir Cohen tzaf...@cohens.org.ilwrote:
3. You still need to export the variables to make them available in the
environment of the shell script:
export $EXPORTED_VARS
Well, not
On Fri, Oct 02, 2009 at 11:33:52AM +0200, Oleg Goldshmidt wrote:
Noam Meltzer tsn...@gmail.com writes:
On Thu, Oct 1, 2009 at 12:57 PM, Tzafrir Cohen tzaf...@cohens.org.il
wrote:
3. You still need to export the variables to make them
available in the
Tzafrir Cohen tzaf...@cohens.org.il writes:
Having to export what you explicitly set is a strange habbit for a
configuration format.
Why? Doesn't your ~/.bash_profile export what it needs to?
#!/bin/bash
function die() {
Nit #1: you can get rid of 'function' and save a whole word while
On Sat, Oct 03, 2009 at 08:17:49PM +0200, Oleg Goldshmidt wrote:
Tzafrir Cohen tzaf...@cohens.org.il writes:
Having to export what you explicitly set is a strange habbit for a
configuration format.
Why? Doesn't your ~/.bash_profile export what it needs to?
That file is not merely a
On Thu, Oct 1, 2009 at 12:57 PM, Tzafrir Cohen tzaf...@cohens.org.ilwrote:
3. You still need to export the variables to make them available in the
environment of the shell script:
export $EXPORTED_VARS
Well, not necessarily.
At least in bash (I didn''t check /bin/sh), you can use 'set -a'
Noam Meltzer tsn...@gmail.com writes:
On Thu, Oct 1, 2009 at 12:57 PM, Tzafrir Cohen tzaf...@cohens.org.il wrote:
3. You still need to export the variables to make them
available in the
environment of the shell script:
export $EXPORTED_VARS
Well, not
On Wed, Sep 30, 2009 at 05:57:39PM +0200, Itay Donenhirsch wrote:
here's an idea - change the callee script to a bash script which
sources the config file, and then call the real perl script. something
along:
#!/bin/bash
source config.env
./script.pl $*
1. bashism:
you meant:
#!/bin/sh
thanks for the tips :)
On Thu, Oct 1, 2009 at 12:57 PM, Tzafrir Cohen tzaf...@cohens.org.il wrote:
On Wed, Sep 30, 2009 at 05:57:39PM +0200, Itay Donenhirsch wrote:
here's an idea - change the callee script to a bash script which
sources the config file, and then call the real perl script.
Hello,
I have bash script which alters environment, kind of configuration,
let's say config.env.
I'd like to import this environment in context of perl script. How do
I do equivalent to 'source config.env' from perl code? I mean I could
just run bash in subprocess, but it would not alter perl
On Wed, Sep 30, 2009 at 04:48:41PM +0200, Alexander Indenbaum wrote:
Hello,
I have bash script which alters environment, kind of configuration,
let's say config.env.
I'd like to import this environment in context of perl script. How do
I do equivalent to 'source config.env' from perl
On Wed, Sep 30, 2009 at 4:48 PM, Alexander Indenbaum
alexander.indenb...@gmail.com wrote:
Hello,
I have bash script which alters environment, kind of configuration,
let's say config.env.
I'd like to import this environment in context of perl script. How do
I do equivalent to 'source
here's an idea - change the callee script to a bash script which
sources the config file, and then call the real perl script. something
along:
#!/bin/bash
source config.env
./script.pl $*
--
itay
On Wed, Sep 30, 2009 at 5:09 PM, Tzafrir Cohen tzaf...@cohens.org.il wrote:
On Wed, Sep 30, 2009
On Wednesday 30 Sep 2009 17:52:34 Oleg Goldshmidt wrote:
On Wed, Sep 30, 2009 at 4:48 PM, Alexander Indenbaum
alexander.indenb...@gmail.com wrote:
Hello,
I have bash script which alters environment, kind of configuration,
let's say config.env.
I'd like to import this environment in
14 matches
Mail list logo