TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:17715] Aliasing
We have a mixture of AIX, Linux, and Solaris boxes, here -
as such, most of the time I'm using ksh (sigh), but I've compiled
bash on a lot of them. I want the trick to work in ksh, too. :)
Nick Reinking
esper@usinternet.com, on 05/16/2000 12:30:38 PM
To: tclug-list@mn-linux.org @ PMDF
cc:
Subject: Re: [TCLUG:17715] Aliasing
Nick.T.Reinking@supervalu.com said:
> That doesn't work - you have to alias a command, not
> just text. :)
No, you can alias something to any text you want, it just normally gets
ignored unless the alias matches the first word on the command line. bash,
however, has the space-at-the-end-of-another-alias trick, allowing you to do:
alias ps='ps '
alias z='aux'
ps z
<system responds with ps aux output>
It _does_ work - I've done this example on two different systems.
Unfortunately, both of them only have bash and csh installed and I know
nothing about csh, so I can't verify that it works in anything other than
bash.
(Say, Nick - since aliasing is a shell function, what shell are you using,
anyhow?)
--
"Two words: Windows survives." - Craig Mundie, Microsoft senior strategist
"So does syphillis. Good thing we have penicillin." - Matthew Alton
Geek Code 3.1: GCS d- s+: a- C++ UL++$ P+>+++ L++>++++ E- W--(++) N+ o+ !K
w---$ O M- !V PS+ PE Y+ PGP t 5++ X+ R++ tv- b++ DI++++ D G e* h+ r++ y+
---------------------------------------------------------------------
To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
For additional commands, e-mail: tclug-list-help@mn-linux.org