Re: How to add dir to path



Hi Andrei,

It works as it should on my system:

amp@think:~$ grep Hello .bash*
.bash_profile:echo "Hello from bash_profile"
.bashrc:echo "Hello from bashrc"
amp@think:~$ bash
Hello from bashrc
amp@think:~$ exit
exit
amp@think:~$ bash --login
Hello from bashrc
Hello from bash_profile
amp@think:~$



It works on my system as well, for every new bash WINDOW I open,
but not for every new bash SESSION I start:

M> grep "Hi" .bash*
.bash_profile:echo "Hi from .bash_profile..."
.bashrc:echo "Hi from .bashrc..."
M>

Every newly opened bash window greets me with:
Hi from .bashrc...
Hi from .bash_profile...

Every tty greets me with:
Hi from .bashrc...
Hi from .bash_profile...

When I enter bash --login I also get:
Hi from .bashrc...
Hi from .bash_profile...
But then again, that's the same as opening a new bash window.

But whenever I open a new session in an already opened bash window,
I only get:
Hi from .bashrc...

So, from that, I conclude that it's default behavior that whenever I open
a new session, only .bashrc is read.

Anyway, thanks for the tip and for your response.

Manon.


Relevant Pages

  • Re: How to add dir to path
    ... Well, I don't know, but adding it to .bashrc works and I'm glad to know ... amp@think:~$ grep Hello .bash* ... amp@think:~$ exit ... (Albert Einstein) ...
    (Debian-User)
  • can I feed bash commands simulating a user typing?
    ... I would like to write a little gui program that one would ... which would then feed commands to ... this or another bash window. ... the same bash window, but a second choice would be to ...
    (comp.os.linux.development.apps)
  • Re: Is Maxima available for OS X?
    ... > in the initial bash window instead of a separate xterm window) ... > I prefer the launcher method for xmaxima but this trick will be ... > pretty useful for other X11 applications (bash provides much better ...
    (sci.math.symbolic)
  • Re: TRUE is 0 is FALSE
    ... the if statement is testing the exit status of the function, ... While 1 is considered true in boolean logic, ... bash if statements. ... It's about whether that means that true has the value zero, or if it's simply what's stated throughout the bulk of the shell documentation - that "if" operates on exit statuses and takes the "then" leg given a zero/success exit status. ...
    (comp.unix.shell)
  • Re: is something wrong in it?
    ... >> then edit your .bashrc, and add the following lines, and remove the ... rita]$ pico .bashrc ... >bash: pico: No such file or directory ...
    (comp.os.linux.misc)