Re: Editing /etc/profile, some doubts

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

 



Thanks Robert.
However, i'm very new to linux and don't know shell scripting very well.
How exactly would this script look like?
As i said, i just want to add one of my folders to my path enviroment
variable. Specifically, i got a directory called /myStuff that has
some programs. I'd like to add this folder to my PATH variable so i
can these programs from any folder i'm in.
Thanks. 


On Sat, 29 Jan 2005 08:38:45 -0500 (EST), Robert P. J. Day
<rpjday@xxxxxxxxxxxxxx> wrote:
> On Sat, 29 Jan 2005, Leandro Melo wrote:
> 
> > Hi, I want to add a folder to my PATH enviroment variable, then i
> > tought i could edit /etc/profile. However, Fedora's  /etc/profile file
> > seems a little diferent from what i expected.
> > In fact, i don't know excatly where i should change it to add this new folder.
> > I could see this line in /etc/profile
> >
> > if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
> >          if [ "$2" = "after" ] ; then
> >             PATH=$PATH:$1
> >          else
> >             PATH=$1:$PATH
> >          fi
> >       fi
> 
> don't mess with /etc/profile.  note, instead, that /etc/profile, as
> part of its startup, will descend into /etc/profile.d and invoke every
> script in there with the suffix ".sh".  just add a new script to that
> directory for each new "feature" you want to customize during the
> login process.
> 
> rday
> 


-- 
Leandro


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

  Powered by Linux