Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!alberta!arcsun.arc.ab.ca!cpsc.ucalgary.ca!deraadt From: deraadt@cpsc.ucalgary.ca (deraadt) Newsgroups: comp.unix.shell Subject: Re: Alias to change path on the fly - ALTERNATIVE Message-ID: Date: 14 Nov 90 06:42:46 GMT References: <1990Nov8.014515.13882@cpsc.ucalgary.ca> Distribution: na Organization: UofC cpsc Lines: 27 In-Reply-To: paul@ixi.uucp's message of 10 Nov 90 15:41:52 GMT Nntp-Posting-Host: cs-sun-fsa In article <1990Nov8.014515.13882@cpsc.ucalgary.ca> paquette@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.