🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1785

Re: Alias to change path on the fly - ALTERNATIVE

#1785
From: deraadt
Date: Wed, 14 Nov 1990 06:42
27 lines
1784 bytes
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.
 <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@cpsc.ucalgary.ca
Technical Details
Message-ID: <DERAADT.90Nov13224246@cs-sun-fsa.cpsc.ucalgary.ca>
Path: arc1-ca.pugleaf.net!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
References: <1990Nov8.014515.13882@cpsc.ucalgary.ca> <PAUL.90Nov10154152@cheshire.ixi.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <DERAADT.90Nov13224246@cs-sun-fsa.cpsc.ucalgary.ca>
Date: 14 Nov 90 06:42:46 GMT
References: <1990Nov8.014515.13882@cpsc.ucalgary.ca>
 <PAUL.90Nov10154152@cheshire.ixi.uucp>
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