Re: Script export problem in FC3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Samuel Díaz García kirjoitti viestissään (lähetysaika 
keskiviikko, 22. joulukuuta 2004 00:43):
> I need to modify the PATH environment using a script. My
> script is:
>
> --begin--
> #!bin/sh
> export PATH=$PATH:/mydir
> --end--
>
> If I run the export command in command line I have no problem,
> but when I run my script, and I run
>
> echo $PATH
>
> I can see that the path environtment variable isn't changed.
>
> What can be the problem?

The script is run in a new shell, and the export command has 
effect only in that shell and any commands started from it. You 
must use the "source" command to execute the script in the 
current shell.



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux