Alias to change path on the fly - ALTERNATIVE

deraadt deraadt at cpsc.ucalgary.ca
Wed Nov 14 17:42:46 AEST 1990


In article <1990Nov8.014515.13882 at cpsc.ucalgary.ca> paquette at cpsc.ucalgary.ca:
>  Quick and I hope a fairly simple question. We have some programs
> that must be able to take advantage of two co-processors on a sun.
> The executables are name prog_host (no coprocessor), prog_sc (Supercard
> coprocessor) and prog_qc (Quickcard coprocessor).
>  Each executable is in a seperate directory. I want to be able to change
> my path on the fly to get at a certain executable. This is what I have
> done so far.
> Let's say my path is set as :
> (. /usr/ucb /bin /usr/bin /usr/local/bin /home/insight/sparc/bin/itahost)

Create a shell script that determines the situation, and then runs the
correct one.

file ~/bin/g88 contains:
	exec ~me/bin/`arch`/$0 $*

and there are directories in ~/bin called sun3, sun4, etc.
This can be extended to support more than just `arch` if desired.

Or whatever else is required to do the job.
This along the lines of how Framemaker is shipped.
 <tdr.
--

SunOS 4.0.3: /usr/include/vm/as.h, Line 44      | Theo de Raadt
Is it a typo? Should the '_'  be an 's'?? :-)   | deraadt at cpsc.ucalgary.ca



More information about the Comp.unix.shell mailing list