D&C GLug - Home Page

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

Re: [LUG] Simple Script Problem

 

Steve Marvell wrote:
> Peter Lloyd-Jones wrote:
> 
>> Great it works, but when I close the programme I feel I should be 
>> in ......./JMRI, but I am not, I am back where I ran the script.
> 
> This is because you're starting a new shell.

And when the shell ends, you are back where you started.

I'd be tempted to add;

export
PATH=/usr/java/j2sdk1.4.2_10/jre/bin:$PATH:/home/peter/jmri/1.7.5/JMRI

(all one line) to the ".bashrc" file in Peters home directory (~/.bashrc).

Then he should be able to run utilities in that directory just by typing
their name;

$ PanelPro

Assuming the utilities have been written such that it doesn't matter
what directory you start them from. It is fairly easy to write scripts
that way, or wrap existing scripts.

-- 
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