Re: How to add dir to path

2007-08-11 Thread Carl Johnson
This is to the list this time, instead of a direct reply -- Sorry! "Manon Metten" <[EMAIL PROTECTED]> writes: > 1. (*) text/plain ( ) text/html > > Hi Andrei, > > On 8/10/07, Andrei Popescu <[EMAIL PROTECTED]> wrote: > > Just look at your .bash_profile: > > > > # ~/.bash_

Re: How to add dir to path

2007-08-11 Thread Manon Metten
Hi Andrei, On 8/10/07, Andrei Popescu <[EMAIL PROTECTED]> wrote: Just look at your .bash_profile: > > # ~/.bash_profile: executed by bash(1) for login shells. And in .bashrc I find: # ~/.bashrc: executed by bash(1) for non-login shells. So this is my conclusion: Whenever I open a new bash

Re: How to add dir to path

2007-08-11 Thread Manon Metten
Hi Wolodja, As a side note on documentation. You might find packages like "dwww" or > "dhelp" useful. They provide a single entry point to access all > installed documentation. Thanks! It's a very useful tip. Manon.

Re: How to add dir to path

2007-08-11 Thread Manon Metten
Hi Wayne, I have never seen this way of defining a path [ PATH=~/XX:"${PATH}" ] These lines come from .bash_profile: # set PATH so it includes user's private bin if it exists if [ -d ~/bin ] ; then PATH=~/bin:"${PATH}" fi I learned PATH="a path:a new path" everything inclosed in quotes

Re: How to add dir to path

2007-08-11 Thread Wolodja Wentland
On Tue, Aug 07, 2007 at 22:21 +0200, Manon Metten wrote: > On 8/7/07, P Kapat <[EMAIL PROTECTED]> wrote: > > I ain't got no /usr/share/doc/bash/examples dir. > > > There's also no /usr/local/share/doc dir. > > > Where do I get these examples? > > apt-get install bash-doc > > In general, for any pac

Re: How to add dir to path

2007-08-10 Thread Wayne Topa
Mumia W..([EMAIL PROTECTED]) is reported to have said: > On 08/07/2007 10:32 AM, Manon Metten wrote: > >Hi, > > > >I want to add the dir ~/scripts to my path, what command do I use for that? > > > >M> echo $PATH > >/usr/local/bin:/usr/bin:/bin:/usr/games > > > >But how do I add ~/scripts to that pa

Re: How to add dir to path

2007-08-10 Thread David Brodbeck
On Aug 10, 2007, at 1:50 PM, Wayne Topa wrote: I have never seen this way of defining a path [ PATH=~/XX:"${PATH}" ] I learned PATH="a path:a new path" everything inclosed in quotes. I think (?) i tried your way yesterday and got strange results but I deleted that test file so I've alw

Re: How to add dir to path

2007-08-10 Thread Andrei Popescu
On Fri, Aug 10, 2007 at 09:43:39PM +0200, Manon Metten wrote: > So, from that, I conclude that it's default behavior that whenever I open > a new session, only .bashrc is read. Just look at your .bash_profile: # ~/.bash_profile: executed by bash(1) for login shells. Regards, Andrei -- If you

Re: How to add dir to path

2007-08-10 Thread Wayne Topa
Manon Metten([EMAIL PROTECTED]) is reported to have said: > Hi Wayne, > > On 8/10/07, Wayne Topa <[EMAIL PROTECTED]> wrote: > > Are you doing all of this in KDE? If so I have no clue. I would > > suggest you go to a console VT and enter the path statements I showed. > > Then, if it doesn't work

Re: How to add dir to path

2007-08-10 Thread Manon Metten
Hi Andrei, It works as it should on my system: > > [EMAIL PROTECTED]:~$ grep Hello .bash* > .bash_profile:echo "Hello from bash_profile" > .bashrc:echo "Hello from bashrc" > [EMAIL PROTECTED]:~$ bash > Hello from bashrc > [EMAIL PROTECTED]:~$ exit > exit > [EMAIL PROTECTED]:~$ bash --login > Hello

Re: How to add dir to path

2007-08-10 Thread Andrei Popescu
On Fri, Aug 10, 2007 at 09:04:15PM +0200, Manon Metten wrote: > > I believe the correct way to do this is to set the path in ~/.bashrc. > > Set it like so: > > > > PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:$HOME/scripts > > > > I've tried some of the other ways discussed in the thread, and they

Re: How to add dir to path

2007-08-10 Thread Manon Metten
Hi Orestes, On 8/10/07, Orestes leal <[EMAIL PROTECTED]> wrote: > I believe the correct way to do this is to set the path in ~/.bashrc. > > Set it like so: > > > > PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:$HOME/scripts > > This works but, the ~/scripts dir appear for every user? > > because i

Re: How to add dir to path

2007-08-10 Thread Manon Metten
Hi Mumia, On 8/10/07, Mumia W.. <[EMAIL PROTECTED]> wrote: > I want to add the dir ~/scripts to my path, what command do I use for > that? > > > > M> echo $PATH > > /usr/local/bin:/usr/bin:/bin:/usr/games > > > > But how do I add ~/scripts to that path? > > > > Thanks, Manon. > > > > I believe th

Re: How to add dir to path

2007-08-10 Thread Manon Metten
Hi Wayne, On 8/10/07, Wayne Topa <[EMAIL PROTECTED]> wrote: Are you doing all of this in KDE? If so I have no clue. I would > suggest you go to a console VT and enter the path statements I showed. > Then, if it doesn't work there, there is a real problem ... Yes, I was doing this in KDE. I s

Re: How to add dir to path

2007-08-10 Thread Orestes leal
On Fri, 10 Aug 2007 12:45:40 -0500 "Mumia W.." <[EMAIL PROTECTED]> wrote: > On 08/07/2007 10:32 AM, Manon Metten wrote: > > Hi, > > > > I want to add the dir ~/scripts to my path, what command do I use for that? > > > > M> echo $PATH > > /usr/local/bin:/usr/bin:/bin:/usr/games > > > > But how d

Re: How to add dir to path

2007-08-10 Thread Mumia W..
On 08/07/2007 10:32 AM, Manon Metten wrote: Hi, I want to add the dir ~/scripts to my path, what command do I use for that? M> echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/games But how do I add ~/scripts to that path? Thanks, Manon. I believe the correct way to do this is to set the path

Re: How to add dir to path

2007-08-10 Thread Wayne Topa
Manon Metten([EMAIL PROTECTED]) is reported to have said: > Hi Wayne, > > On 8/9/07, Wayne Topa <[EMAIL PROTECTED]> wrote: > > OK I think I found the problem. > > > > Your path statement is incorrect. > > PATH=~/XX:"${PATH}" > > > > Try this > > > > SCRIPTS="/where/your/scripts/are" > > PATH="$PA

Re: How to add dir to path

2007-08-10 Thread Manon Metten
Hi Mike, On 8/10/07, Mike McCarty <[EMAIL PROTECTED]> wrote: > Errr... She :-) > > Sorry 'bout that! Hard to see what you look like! Never heard of a guy named Manon, only of 'A Boy Named Sue'. But then again: What's in a name? :-) Abject apologies and all that. > Also, that's a better quote

Re: How to add dir to path

2007-08-10 Thread Manon Metten
Hi Wayne, On 8/9/07, Wayne Topa <[EMAIL PROTECTED]> wrote: OK I think I found the problem. > > Your path statement is incorrect. > PATH=~/XX:"${PATH}" > > Try this > > SCRIPTS="/where/your/scripts/are" > PATH="$PATH:$SCRIPTS" That ain't the solution either. I got exactly the same output. So I e

Re: How to add dir to path

2007-08-09 Thread Mike McCarty
Manon Metten wrote: Hi Mike, On 8/7/07, Mike McCarty <[EMAIL PROTECTED]> wrote: I do believe he's got it... almost. Errr... She :-) Sorry 'bout that! Hard to see what you look like! Abject apologies and all that. Also, that's a better quote (from "My Fair Lady"). If ENV_VAR is an environ

Re: How to add dir to path

2007-08-09 Thread Wayne Topa
Manon Metten([EMAIL PROTECTED]) is reported to have said: > Hi Wayne, > > On 8/8/07, Wayne Topa <[EMAIL PROTECTED]> wrote: > > Are you saying that you put the PATH in .bash_profile like > > PATH="./scripts:$PATH" > > export PATH > > > > And doing > > . . .bash_profile > > > > does not make it ava

Re: How to add dir to path

2007-08-09 Thread Manon Metten
Hi Wayne, On 8/8/07, Wayne Topa <[EMAIL PROTECTED]> wrote: Are you saying that you put the PATH in .bash_profile like > PATH="./scripts:$PATH" > export PATH > > And doing > . . .bash_profile > > does not make it availible when it finishes? If that is so, please > post the contents of your .bash_

Re: How to add dir to path

2007-08-09 Thread Jeff Fisher
Nyizsnyik Ferenc wrote: > On Wed, 8 Aug 2007 18:38:49 +0200 > "Manon Metten" <[EMAIL PROTECTED]> wrote: > > >> Hi, >> >> This thread ain't over yet. Apart from using ~/bin (as Andrei Popescu >> suggested) I noticed that adding 'export PATH=$HOME/scripts:$PATH' >> to the end of ~/.bash_profile, t

Re: How to add dir to path

2007-08-08 Thread Manoj Srivastava
Hi, Here is how my path is set. I use zsh. --8<---cut here---start->8--- ## What directories should we be looking for? COMMON_SYS_DIRS=(/bin /usr/bin /sbin /usr/sbin /usr/local/sbin /usr/games) case "$MY_SYS_TYPE" in hppa1.1-hp-hpux*) SYS_D

Re: How to add dir to path

2007-08-08 Thread Wayne Topa
Manon Metten([EMAIL PROTECTED]) is reported to have said: > Hi Wayne, > > On 8/8/07, Wayne Topa <[EMAIL PROTECTED]> wrote: > > Any changes made to .bash_profile or .bashrc require a restart of that > > file. > > > > If you have at the end of the .bash_profile, the command > > . .bashrc > > > > Th

Re: How to add dir to path

2007-08-08 Thread Manon Metten
Hi Wayne, Pretty straightforward your PS1 example. That's one bridge too far for me now, as I'm only for about one year on Debian. I simply use PS1='M> ' for user and PS1='R> ' for root :-) For me, the rest is redundant info, which only distracts me. Isn't Debian (Linux) fun! Yes, it is. That

Re: How to add dir to path

2007-08-08 Thread Wayne Topa
Manon Metten([EMAIL PROTECTED]) is reported to have said: > Hi Wayne, > > On 8/8/07, Wayne Topa <[EMAIL PROTECTED]> wrote: > <> > > Executing . .bash_profile makes no difference. The new dir won't show > up in another session, only if I open a new bash window, but never in > a new session.

Re: How to add dir to path

2007-08-08 Thread Manon Metten
Hi Andrew, On 8/8/07, Andrew Sackville-West <[EMAIL PROTECTED]> wrote: if you haven't yet, you would be well served to read man bash. As I already said (Quote: "I first have to work my way to 'man bash' "), I surely will. It is an excellent resource, and you'll learn bash scripting at the sam

Re: How to add dir to path

2007-08-08 Thread Manon Metten
Hi Wayne, On 8/8/07, Wayne Topa <[EMAIL PROTECTED]> wrote: Any changes made to .bash_profile or .bashrc require a restart of that > file. > > If you have at the end of the .bash_profile, the command > . .bashrc > > Then after editing either one, you do > . .bash_profile ( which is the same as lo

Re: How to add dir to path

2007-08-08 Thread Andrew Sackville-West
On Wed, Aug 08, 2007 at 07:06:25PM +0200, Manon Metten wrote: > Hi Nyizsnyik, > > On 8/8/07, Nyizsnyik Ferenc <[EMAIL PROTECTED]> wrote: > > Adding $HOME to /etc/profile should not work the way you want it to. > > These settings are global, consider them as "executed by root", so in > > this case

Re: How to add dir to path

2007-08-08 Thread Wayne Topa
Manon Metten([EMAIL PROTECTED]) is reported to have said: > Hi, > > This thread ain't over yet. Apart from using ~/bin (as Andrei Popescu > suggested) I noticed that adding 'export PATH=$HOME/scripts:$PATH' > to the end of ~/.bash_profile, the newly added dir is not available in > any new session

Re: How to add dir to path

2007-08-08 Thread Manon Metten
Hi Nyizsnyik, On 8/8/07, Nyizsnyik Ferenc <[EMAIL PROTECTED]> wrote: Adding $HOME to /etc/profile should not work the way you want it to. > These settings are global, consider them as "executed by root", so in > this case $HOME will resolve as /root, not /home/manon as you may have > expected.

Re: How to add dir to path

2007-08-08 Thread Nyizsnyik Ferenc
On Wed, 8 Aug 2007 18:38:49 +0200 "Manon Metten" <[EMAIL PROTECTED]> wrote: > Hi, > > This thread ain't over yet. Apart from using ~/bin (as Andrei Popescu > suggested) I noticed that adding 'export PATH=$HOME/scripts:$PATH' > to the end of ~/.bash_profile, the newly added dir is not available in

Re: How to add dir to path

2007-08-08 Thread Manon Metten
Hi, This thread ain't over yet. Apart from using ~/bin (as Andrei Popescu suggested) I noticed that adding 'export PATH=$HOME/scripts:$PATH' to the end of ~/.bash_profile, the newly added dir is not available in any new session I open. However, when I open a new bash window, the new dir is availab

Re: How to add dir to path

2007-08-08 Thread Andrew Sackville-West
On Wed, Aug 08, 2007 at 06:44:07PM +0300, Andrei Popescu wrote: > On Tue, Aug 07, 2007 at 11:54:52PM -0700, Andrew Sackville-West wrote: > > > > Instead of a ~/script dir I use a ~/bin dir and didn't need to change > > > anything because ~/.bash_profile already contains: > > > > I have to relat

Re: How to add dir to path

2007-08-08 Thread Manon Metten
Hi Andrew, On 8/8/07, Andrei Popescu <[EMAIL PROTECTED]> wrote: > But how do I add ~/scripts to that path? > > I saw nobody in the thread suggested this: > > Instead of a ~/script dir I use a ~/bin dir and didn't need to change > anything because ~/.bash_profile already contains: Thanks for t

Re: How to add dir to path

2007-08-08 Thread Andrei Popescu
On Tue, Aug 07, 2007 at 11:54:52PM -0700, Andrew Sackville-West wrote: > > Instead of a ~/script dir I use a ~/bin dir and didn't need to change > > anything because ~/.bash_profile already contains: > > I have to relate my latest thing. i'm heading out for a three week > trip and need to work

Re: How to add dir to path

2007-08-07 Thread Andrew Sackville-West
On Wed, Aug 08, 2007 at 08:45:30AM +0300, Andrei Popescu wrote: > On Tue, Aug 07, 2007 at 05:32:49PM +0200, Manon Metten wrote: > > Hi, > > > > I want to add the dir ~/scripts to my path, what command do I use for that? > > > > M> echo $PATH > > /usr/local/bin:/usr/bin:/bin:/usr/games > > > > Bu

Re: How to add dir to path

2007-08-07 Thread Takehiko Abe
Andrei Popescu wrote: # ~/.bash_profile: executed by bash(1) for login shells. Set gnome-terminal to use a login shell. Doh! Thanks. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: How to add dir to path

2007-08-07 Thread Andrei Popescu
On Wed, Aug 08, 2007 at 03:12:28PM +0900, Takehiko Abe wrote: > # Sorry, I sent a mail directly to you. > > Andrei Popescu wrote: > > > Instead of a ~/script dir I use a ~/bin dir and didn't need to change > > anything because ~/.bash_profile already contains: > > > > # set PATH so it includes user

Re: How to add dir to path

2007-08-07 Thread Takehiko Abe
# Sorry, I sent a mail directly to you. Andrei Popescu wrote: > Instead of a ~/script dir I use a ~/bin dir and didn't need to change > anything because ~/.bash_profile already contains: > > # set PATH so it includes user's private bin if it exists > if [ -d ~/bin ] ; then > PATH=~/bin:"${PA

Re: How to add dir to path

2007-08-07 Thread Andrei Popescu
On Tue, Aug 07, 2007 at 05:32:49PM +0200, Manon Metten wrote: > Hi, > > I want to add the dir ~/scripts to my path, what command do I use for that? > > M> echo $PATH > /usr/local/bin:/usr/bin:/bin:/usr/games > > But how do I add ~/scripts to that path? I saw nobody in the thread suggested this:

Re: How to add dir to path

2007-08-07 Thread Andrew Sackville-West
On Tue, Aug 07, 2007 at 11:12:43PM +0200, Manon Metten wrote: > Hi Mike, > > On 8/7/07, Mike McCarty <[EMAIL PROTECTED]> wrote: > > I do believe he's got it... almost. > > > Errr... She :-) > heh heh. > > This is confusing me. I understand that if ENV_VAR is an environment > variable > than

Re: How to add dir to path

2007-08-07 Thread Manon Metten
Hi Mike, On 8/7/07, Mike McCarty <[EMAIL PROTECTED]> wrote: I do believe he's got it... almost. Errr... She :-) If ENV_VAR is an environment variable, then the shell interprets > $ENV_VAR as a request to remove $ENV_VAR from the command, and replace > it with the value of ENV_VAR. So... > >

Re: How to add dir to path

2007-08-07 Thread Manon Metten
Hi Mike, On 8/7/07, Mike McCarty <[EMAIL PROTECTED]> wrote: >>$ export PATH=~/scripts:$PATH > > > Well, I combined two commands into one. > > $ x=y > sets an environment variable x to value y. > $ export x > makes x available to all subprocesses in the tree which get created > after the export

Re: How to add dir to path

2007-08-07 Thread Mike McCarty
Manon Metten wrote: Thanks for explaining. So I understand that export PATH=~/scripts:$PATH concatenates "~/scripts" and "$PATH" and sets the result to be the new $PATH. I do believe he's got it... almost. If ENV_VAR is an environment variable, then the shell interprets $ENV_VAR as a request

Re: How to add dir to path

2007-08-07 Thread Mike McCarty
Manon Metten wrote: Hi Mike, On 8/7/07, Mike McCarty <[EMAIL PROTECTED]> wrote: Do something like this $ export PATH=~/scripts:$PATH If you put it into the appropriate startup script it will get done every time. I was looking for some kind of 'path' command but could not find anything alik

Re: How to add dir to path

2007-08-07 Thread Manon Metten
Hi PK, On 8/7/07, P Kapat <[EMAIL PROTECTED]> wrote: > I ain't got no /usr/share/doc/bash/examples dir. > > There's also no /usr/local/share/doc dir. > > Where do I get these examples? > > apt-get install bash-doc > > In general, for any package, pkg, pkg-doc is a good source of help and > exampl

Re: How to add dir to path

2007-08-07 Thread P Kapat
Hello Mannon, On 8/7/07, Manon Metten <[EMAIL PROTECTED]> wrote: > Hi PK, > > On 8/7/07, P Kapat <[EMAIL PROTECTED]> wrote: [...snip...] > > For more on bash startup see > > /usr/share/doc/bash/examples/startup-files for examples. > > > I ain't got no /usr/share/doc/bash/examples dir. > There's

Re: How to add dir to path

2007-08-07 Thread Manon Metten
Hi David, On 8/7/07, David Brodbeck <[EMAIL PROTECTED]> wrote: > What's the reason I shouldn't touch /etc/profile but use > ~/.bash_profile instead? > > They do the same thing, but for different scopes. /etc/profile affects > every account on the system. ~/.bash_profile only affects your own. >

Re: How to add dir to path

2007-08-07 Thread Manon Metten
Hi PK, On 8/7/07, P Kapat <[EMAIL PROTECTED]> wrote: > What's the reason I shouldn't touch /etc/profile but use > > ~/.bash_profile instead? > > For the simple reason that you wouldn't want (or prefer) to mess with > the system's defaults unless otherwise forced to. Moreover, think of a > machine

Re: How to add dir to path

2007-08-07 Thread David Brodbeck
On Aug 7, 2007, at 11:02 AM, Manon Metten wrote: Hi Nyizsnyik, On 8/7/07, Nyizsnyik Ferenc <[EMAIL PROTECTED]> wrote: I would rather you checked your ~/.bash_profile file. What's the reason I shouldn't touch /etc/profile but use ~/.bash_profile instead? They do the same thing, but for dif

Re: How to add dir to path

2007-08-07 Thread P Kapat
On 8/7/07, Manon Metten <[EMAIL PROTECTED]> wrote: > > What's the reason I shouldn't touch /etc/profile but use > ~/.bash_profile instead? For the simple reason that you wouldn't want (or prefer) to mess with the system's defaults unless otherwise forced to. Moreover, think of a machine where you

Re: How to add dir to path

2007-08-07 Thread P Kapat
On 8/7/07, Manon Metten <[EMAIL PROTECTED]> wrote: [..snip..] > If I want an environment variable available all the time, I should place it > in > either /etc/profile or ~/.bash_profile, right? Yes. Preferably ~/.bash_profile and export it. -- Regards PK --

Re: How to add dir to path

2007-08-07 Thread Manon Metten
Hi Andrew, On 8/7/07, Andrew Sackville-West <[EMAIL PROTECTED]> wrote: $PATH is an environment variable like any other and gets assigned a > value in the same way as any other. export is used to make a variable > available to other processes that come after the one spawned by the > assignment pro

Re: How to add dir to path

2007-08-07 Thread ISHWAR RATTAN
On Tue, 7 Aug 2007, Manon Metten wrote: What's the reason I shouldn't touch /etc/profile but use ~/.bash_profile instead? A study of tutorial on Unix/Linux will take you a long way. HTH, -ishwar -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Conta

Re: How to add dir to path

2007-08-07 Thread Manon Metten
Hi Nyizsnyik, On 8/7/07, Nyizsnyik Ferenc <[EMAIL PROTECTED]> wrote: I would rather you checked your ~/.bash_profile file. > What's the reason I shouldn't touch /etc/profile but use ~/.bash_profile instead? Manon.

Re: How to add dir to path

2007-08-07 Thread Andrew Sackville-West
On Tue, Aug 07, 2007 at 06:24:08PM +0200, Manon Metten wrote: > Hi Mike, > > On 8/7/07, Mike McCarty <[EMAIL PROTECTED]> wrote: > > Do something like this > > > > $ export PATH=~/scripts:$PATH > > > > If you put it into the appropriate startup script it will get done > > every time. > > > > I

Re: How to add dir to path

2007-08-07 Thread Nyizsnyik Ferenc
On Tue, 7 Aug 2007 18:24:08 +0200 "Manon Metten" <[EMAIL PROTECTED]> wrote: > Hi Mike, > > On 8/7/07, Mike McCarty <[EMAIL PROTECTED]> wrote: > > Do something like this > > > > $ export PATH=~/scripts:$PATH > > > > If you put it into the appropriate startup script it will get done > > every time

Re: How to add dir to path

2007-08-07 Thread Manon Metten
Hi Mike, On 8/7/07, Mike McCarty <[EMAIL PROTECTED]> wrote: Do something like this > > $ export PATH=~/scripts:$PATH > > If you put it into the appropriate startup script it will get done > every time. I was looking for some kind of 'path' command but could not find anything alike. I didn't kn

Re: How to add dir to path

2007-08-07 Thread Mike McCarty
Manon Metten wrote: Hi, I want to add the dir ~/scripts to my path, what command do I use for that? M> echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/games But how do I add ~/scripts to that path? Do something like this $ export PATH=~/scripts:$PATH If you put it into the appropriate startup

How to add dir to path

2007-08-07 Thread Manon Metten
Hi, I want to add the dir ~/scripts to my path, what command do I use for that? M> echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/games But how do I add ~/scripts to that path? Thanks, Manon.