🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1706

Re: Alias to change path on the fly

#1706
From: Paul Chamberlain
Date: Fri, 09 Nov 1990 19:36
17 lines
1311 bytes
In article <1990Nov8.014515.13882@cpsc.ucalgary.ca> paquette@cs-sun-fsa.cpsc.ucalgary.ca (Trevor Paquette) writes:
>I have come up with the following aliases to change which directory I will use
>...
>alias host '`echo set path=\($path\)|sed s/itaqc/itahost/|sed s/itasc/itahost/`'
>...

Untested but much more likely to succeed alias follows:

alias host 'set path=(`echo $path|sed s/itaqc/itahost/|sed s/itasc/itahost/`)'
...

But, if I were you, I'd do something like this (which I even tested):

alias host 'set path=(`echo $path|sed "s/ita[a-z]*/itahost/"`)'

Paul Chamberlain | I do NOT represent IBM.     tif@doorstop, sc30661 at ausvm6
512/838-7008     | ...!cs.utexas.edu!ibmchs!auschs!doorstop.austin.ibm.com!tif
Technical Details
Message-ID: <4186@awdprime.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime!doorstop.austin.ibm.com!tif
References: <1990Nov8.014515.13882@cpsc.ucalgary.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime!doorstop.austin.ibm.com!tif
From: tif@doorstop.austin.ibm.com (Paul Chamberlain)
Newsgroups: comp.unix.shell,comp.unix.internals,comp.unix.programmer
Subject: Re: Alias to change path on the fly
Message-ID: <4186@awdprime.UUCP>
Date: 9 Nov 90 19:36:13 GMT
References: <1990Nov8.014515.13882@cpsc.ucalgary.ca>
Sender: news@awdprime.UUCP
Reply-To: tif@doorstop.austin.ibm.com (Paul Chamberlain)
Followup-To: comp.unix.shell
Organization: IBM AWD, Austin, TX
Lines: 17