Re: Weird behavior for a bash script [SOLVED]
--- Michael Marsh <michael.a.marsh@gmail.com> wrote:
> On Wed, 19 Jan 2005 08:11:27 -0800 (PST), Ibrahim Mubarak
> <ibmub80@yahoo.com> wrote:
> > ib:~$ ./beforeMaking.sh
> > /usr/local/lib/pkgconfig:
> > ib:~$ echo $PKG_CONFIG_PATH
> >
> > ib:~$
>
> I don't think you can export a variable to a parent process. That is,
> a script can't set the environment for the shell that calls it.
> That's why bash has the "." builtin. Try
> $ . ./beforeMaking.sh
> instead. You don't need the "#!/bin/bash" line, or for the file to be
> executable, since bash is just treating the file as a series of
> commands to execute, not a separate process.
>
Thx, that worked!
And thanks for all who replied too (Michael Marsh, Michael Redface, Dragan Cvetkovic, and Merlin,
the Mage). It was kool to get the answer so fast ;)
ib
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
Reply to: