[clue] source'ing

David L. Willson DLWillson at TheGeek.NU
Wed Apr 25 12:10:39 MDT 2012


I decided to make a bash master script, which will source a bash settings script, the output of which will be pipelined to a perl worker script.

I really only need to share one variable with the perl worker script, so I can pick it up from the environment or pass it as an argument to the perl worker script.

--
David L. Willson
Trainer, Engineer, Enthusiast
RHCE Network+ A+ Linux+ LPIC-1 Ubuntu
Mobile 720-333-LANS(5267)

This is a good time for a r3volution.

----- Original Message -----
> On Tue, Apr 24, 2012 at 1:15 PM, David L. Willson
> <DLWillson at thegeek.nu> wrote:
> > Can a perl script "source" a bash script, such that exported
> > variables in
> > the bash script are visible in the perl script that called it, or
> > do I
> > absolutely have to use some sort of "message in a bottle"?
> 
> Not quite sure what the point here is, but if you want to share some
> variable
> settings between a shell script and a perl script, then you can
> create a
> file with the variable definitions and source it into the perl script
> as
> well as the shell script.  The assignment syntax for both languages
> is
> compatible enough (just remember that the ''=' cannot have white
> space
> around it for the shell.)
> 
> Marcus Hall
> marcus at tuells.org
> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue
> 


More information about the clue mailing list