Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: I need to export variable as another user

by moritz (Cardinal)
on Aug 06, 2012 at 12:18 UTC ( #985683=note: print w/ replies, xml ) Need Help??

in reply to I need to export variable as another user

The error messages don't match the script you have posted (maybe there's more to the script, and the part that you haven't shown us causes problems?)

Also please read the documentation of system. It doesn't do what you seem think it does.

Also lines like my $bash_profile_run = system(". /home/mrdemo1/pig_profile_tmp); are pointless. The sourcing of the pig_profile_tmp happens only in the subshell that system has spawned for you. And then that subshell exits, and you lose all changes that pig_profile_tmp made to the environment.

Comment on Re: I need to export variable as another user
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985683]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2015-10-09 20:27 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (251 votes), past polls