🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1705

Re: Alias to change path on the fly

#1705
From: John P. Eisenmenger
Date: Thu, 08 Nov 1990 23:02
18 lines
1343 bytes
From article <1990Nov8.014515.13882@cpsc.ucalgary.ca>, by paquette@cs-sun-fsa.cpsc.ucalgary.ca (Trevor Paquette):
>  So the new aliases should be:
> alias host '`echo set path=\($path\)|sed s/itaqc/itahost/|sed s/itasc/itahost/`'
> alias qc   '`echo set path=\($path\)|sed s/itahost/itaqc/|sed s/itasc/itaqc/  `'
> alias sc   '`echo set path=\($path\)|sed s/itaqc/itasc/  |sed s/itahost/itasc/`'
>   But these new aliases give me the following error: 
> 
> `echo set path=\($path\)|sed s/itaqc/itahost/|sed s/itasc/itahost/`: Ambiguous
> 
>  What am I doing wrong???????????

try these:

alias host 'set path = ( `echo $path | sed -e s/itaqc/itahost/ -e s/itasc/itahost/` )
alias qc   'set path = ( `echo $path | sed -e s/itahost/itaqc/ -e s/itasc/itaqc/`   )
alias sc   'set path = ( `echo $path | sed -e s/itahost/itasc/ -e s/itaqc/itasc/`   )

-John
Technical Details
Message-ID: <1178@cameron.egr.duke.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!emory!gatech!mcnc!duke!egr.duke.edu!jpe
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!usc!wuarchive!emory!gatech!mcnc!duke!egr.duke.edu!jpe
From: jpe@egr.duke.edu (John P. Eisenmenger)
Newsgroups: comp.unix.shell,comp.unix.internals,comp.unix.programmer
Subject: Re: Alias to change path on the fly
Message-ID: <1178@cameron.egr.duke.edu>
Date: 8 Nov 90 23:02:56 GMT
References: <1990Nov8.014515.13882@cpsc.ucalgary.ca>
Sender: news@egr.duke.edu
Followup-To: comp.unix.shell
Lines: 18