Re: executing source command from perl



david <michaelgang@xxxxxxxxx> writes:

run_command('source init_file');
run_command('mycommand.pl -configfile config -exec ');

I'm guessing that you are trying to read some environment variables
from init_file before running mycommand.pl?

That won't work. First problem is that source is a shell builtin and
not an independent program, this is why you are getting an
error. Another problem is that child processes can't set environment
variables if the parrent process and even if source was a real
program, it couldn't set the environment for mycommand.pl

//Makholm
.



Relevant Pages

  • Re: executing source command from perl
    ... I'm guessing that you are trying to read some environment variables ... First problem is that source is a shell builtin and ... so it is better for this purpose to write a shell ...
    (comp.lang.perl.misc)
  • Re: executing source command from perl
    ... I'm guessing that you are trying to read some environment variables ... First problem is that source is a shell builtin and ... so it is better for this purpose to write a shell ...
    (comp.lang.perl.misc)
  • Re: Force System Variable Reload w/o reboot
    ... > If you are launching the VB3 app after setting the new value, ... > want to have a look at the Set Environment example at ... I am trying to set an environment variable that is read by a legacy ... >>Environment Variables Dialog respects the change, ...
    (microsoft.public.vb.winapi)
  • Re: Force System Variable Reload w/o reboot
    ... If you are launching the VB3 app after setting the new value, ... want to have a look at the Set Environment example at ... I am trying to set an environment variable that is read by a legacy ... >Environment Variables Dialog respects the change, ...
    (microsoft.public.vb.winapi)
  • Re: executing source command from perl
    ... I'm guessing that you are trying to read some environment variables ... First problem is that source is a shell builtin and ... so it is better for this purpose to write a shell ...
    (comp.lang.perl.misc)