Alias to change path on the fly
John P. Eisenmenger
jpe at egr.duke.edu
Fri Nov 9 10:02:56 AEST 1990
>From article <1990Nov8.014515.13882 at cpsc.ucalgary.ca>, by paquette at 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
More information about the Comp.unix.programmer
mailing list