Re: [Nolug] Adding directory to path

From: Ron Johnson <ron.l.johnson_at_cox.net>
Date: 17 Aug 2002 16:06:26 -0500
Message-Id: <1029618387.9929.6.camel@haggis>

On Sat, 2002-08-17 at 11:36, Mike Raeder wrote:
> Dave Prentice wrote:
>
> > Can someone please tell me how to add a directory to the path in
> > RH7.x?
>
>
> You should be able to do that by editing your /home/username/.bashrc
> file if you only want that environment for yourself. If you'd like to
> set paths for a users, you can edit /etc/profile.
>
> You can also use the "set" command to dynamically set your $PATH
> environment.

More specifically, this is my .bash_profile:
  if [ -f ~/.bashrc ]; then
    source ~/.bashrc
  fi
  if [ -d ~/bin ] ; then
      PATH=~/bin:"${PATH}"
  fi

It checks to see if ~/bin exists, and, if so, adds it to the
front of the PATH. For all you BASIC programmers:
  A$ = B$ + A$

Note that this is on a Debian box, so it may be The Debian Way, or
it may be how bash does it. I don't know...

-- 
+----------------------------------------------------------------+
| Ron Johnson, Jr.        Home: ron.l.johnson@cox.net            |
| Jefferson, LA  USA                                             |
|                                                                |
| I can't make you have an abortion, but you can *make* me pay   |
| child support for 18 years?  However, if I want the child      |
| (and all the expenses that entails) for the *rest*of*my*life*, |
| and you don't want it for 9 months, tough luck???              |
+----------------------------------------------------------------+
___________________
Nolug mailing list
nolug@nolug.org
Received on 08/17/02

This archive was generated by hypermail 2.2.0 : 12/19/08 EST