D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Simple Script Problem

 

On Friday 19 January 2007 13:33, Alex Charrett wrote:

> Futher to what Jamie said, I think you can run a script in your current
> shell instance rather than spawning a new one using source:
>
> $ source script
>
> or the same thing, but shorthand:
>
> $ . script

Hi

Thanks for that, it allows me to to do what I want.  What I am trying to avoid 
is having a PATH which grows like topsy.  (Windows like) It avoids one source 
of errors.

The neat way is of course is to put all ones start up scripts in one 
subdirectory and put that  on ones PATH.  The each script

Copies PATH to temp
creates a new PATH as required
starts the programme using its full name (I forget what this is called, but 
one starts at root /home/and/so/on/down/the /tree
and on exit restores ones old PATH.

Which is what I suppose is what I should get around to doing.  However there 
are attractions to just dropping down into the correct subdirectory.  One can 
have a quick look around and start what one wants!    

Thanks again 

Peter

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html