[X-Unix] shell alias in bash
Brian Medley
bpm-list-osx-unix at 4321.tv
Sat May 22 22:06:15 PDT 2004
On Sun, May 23, 2004 at 02:46:57AM +0200, R. Welz wrote:
> Hello.
> I am no shell expert but I need to have some aliasis:
>
> In .bash_profile I had defined two aliasis (?)
> alias top='top -u'
> alias topold='top'
>
> but a call to topold showed a top -u instead (sorted by %cpu).
>
> So I changed the order:
> alias topold='top'
> alias top='top -u'
> and restarted Terminal.app
>
> But topold still gives a cpu sorted output AND a call to alias:
>
> My-Computer:~ user$ alias
> alias psseti='ps aux | grep seti'
> alias top='top -u'
> alias topold='top'
>
> shouldn't that output be in the other order? What can I do?
Perhaps alias prints aliases in alaphabetical order?
> Can someone help, please?
Use this:
alias topold='"top"'
$ alias i='echo from i'
$ alias j='i'
$ j
from i
$ alias j='"i"'
$ j
bash: i: command not found
--
~`^`'~=-._.-=~'`^`'~=-._.-=~'^'~=-., \|/ (___) \|/ _,.-=~'`^`
@~./'O o`\.~@
"Knowledge is Power" /__( \___/ )__\ *PPPFFBT!*
-- Francis Bacon `\__`U_/'
_.-=~'``'~=-._.-=~'``'~=-._.-=~'`^`'~= <____|' ^^`'~=-.,__,.-=
~'^`'~=-._.-=~'`^`'~=-._.-=~'^'~=-.,__,.-==--^'~=-.,__,.-=~'`^`
More information about the X-Unix
mailing list