[ALUG] Re: Re: Re: Re: Really odd bash error - probably configur

cl at isbd.net cl at isbd.net
Fri Dec 22 11:38:24 GMT 2006


On Fri, Dec 22, 2006 at 11:17:41AM -0000, Ted Harding wrote:
> On 22-Dec-06 cl at isbd.net wrote:
> > [...]
> > I either need to change things so that I don't use BASH_ENV to run the
> > .bashrc (I need to run it for non-login shells but not for
> > non-interactive shells) or I need to remove that offending cd.
> 
> I think I'd remove that offending cd! Its presence embodies an
> assumption that every such script needs to be run in /home/chris,
> which as you've clearly demonstrated can be inappropriate.
> 
It's easy enough, all it needed was to remember where I had cd'ed from
and then restore it. e.g.:-

    olddir=`pwd`
    # do things that require a specific directory
    cd $olddir

-- 
Chris Green (chris at halon.org.uk)



More information about the main mailing list