This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more infromation.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
> -----Original Message----- > From: Thunder Scientific Corporation > Sent: Wednesday, March 29, 2000 10:26 AM > To: crossgcc@sourceware.cygnus.com > Subject: Another dumb question > > > Wow! You folks helped me get sufficiently oriented to get a > hold of the > material I needed to find and master. Thanks a lot, everyone. > > So here is my other question: > Why can't I change my PATH in a shell script? > > Suppose I wish to add the traditional /foo/bar to my search > path. I can > type in "export PATH=$PATH:/foo/bar", and that works. I.e., > if I type "echo > $PATH" I get back my original path concatenated with > ":/foo/bar". Yet if I > try putting this into a shell script I get no error messages but "echo > $PATH" returns the unmodified original search path. None of > the variants > I've tried seems to work. (I'm running a new Red Hat Linux 6.1 > installation.) > > Why? My guess would be that the path does indeed change, but only during the script. When the script ends the original environment is restored. So, if changing PATH in a script is local to the scripts lifetime you need to find a way to change the base environment/PATH from there...If you are running Linux then you are probably using bash. I think we have the manual somewhere so I'll take a look later on. Of course I could be completely wrong...and it is getting a bit off-topic...:-) > Help would again be appreciated. > > Richard Bowser > Engineer > Thunder Scientific Corporation > > email: richardb@thunderscientific.com > > > > ------ > Want more information? See the CrossGCC FAQ, > http://www.objsw.com/CrossGCC/ > Want to unsubscribe? Send a note to > crossgcc-unsubscribe@sourceware.cygnus.com > ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |