Xref: utzoo comp.unix.shell:841 comp.unix.internals:981 comp.unix.programmer:454 Path: 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 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