Re: Standard .bashrc needs a minor fix

2010-05-06 Thread Bob Proulx
Chuck Remes wrote: > The standard .bashrc contains a line of code that precludes certain > scripts from executing. It has to do with the logic for checking if > the session is interactive. > > e.g. > [ -z "$PS1" ] && return > > Usually a few other lines are included afterward to, for example, > ali

Re: Standard .bashrc needs a minor fix

2010-05-06 Thread Bob Proulx
Chuck Remes wrote: > Some scripts like rvm (rvm.beginrescueend.com) need to run at the > tail end of the login process to tack on more data to PATH or set > other environment variables (think of it as a post-login > hook). These kinds of scripts fail to execute with the code above. Thank you for t

Standard .bashrc needs a minor fix

2010-05-06 Thread Chuck Remes
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/local

Re: How to overwrite a symbolic link?

2010-05-06 Thread Bob Proulx
Peng Yu wrote: > Is there a way to overload operators like '>' and '>>' in bash, just > as overloading in C++, etc. Suppose I have already made some bash > program using '>' and '>>' without thinking about symbolic link, but I > begin aware of them later. I would be cumbersome to add a test > state

Re: How to overwrite a symbolic link?

2010-05-06 Thread Bob Proulx
Pierre Gaston wrote: > Peng Yu wrote: > > Suppose that I have a symbolic link link1 pointing to file1. When I > > write to link1, I don't want file1 change. I want it to remove the > > link generated a new file and write to it. > > > > pipe '>' will change file 1. I'm wondering if there is way to d

Re: How to overwrite a symbolic link?

2010-05-06 Thread Peng Yu
On Thu, May 6, 2010 at 10:53 AM, Pierre Gaston wrote: > On Thu, May 6, 2010 at 5:53 PM, Peng Yu wrote: >> Suppose that I have a symbolic link link1 pointing to file1. When I >> write to link1, I don't want file1 change. I want it to remove the >> link generated a new file and write to it. >> >> p

Re: How to overwrite a symbolic link?

2010-05-06 Thread Pierre Gaston
On Thu, May 6, 2010 at 5:53 PM, Peng Yu wrote: > Suppose that I have a symbolic link link1 pointing to file1. When I > write to link1, I don't want file1 change. I want it to remove the > link generated a new file and write to it. > > pipe '>' will change file 1. I'm wondering if there is way to d

How to overwrite a symbolic link?

2010-05-06 Thread Peng Yu
Suppose that I have a symbolic link link1 pointing to file1. When I write to link1, I don't want file1 change. I want it to remove the link generated a new file and write to it. pipe '>' will change file 1. I'm wondering if there is way to do so, so that I don't have to test whether it is a symbol