Xref: utzoo comp.unix.shell:850 comp.unix.internals:989 comp.unix.programmer:460 Path: 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 Summary: Expires: Sender: Followup-To: Keywords: 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