[X-Unix] shell alias in bash
Stroller
MacMonster at myrealbox.com
Sun May 23 10:17:45 PDT 2004
On May 23, 2004, at 1:46 am, R. Welz wrote:
>
> In .bash_profile I had defined two aliasis (?)
> alias top='top -u'
> alias topold='top'
`man top` says:
...The default key for sorting is pid, but other keys
can be used instead. Various output options are available.
OPTIONS
Command line option specifications are processed from left to
right.
Options can be specified more than once. If conflicting
options are
specified, later specifications override earlier ones. This
makes it
viable to create a shell alias for top with preferred defaults
speci-
fied, then override those preferred defaults as desired on the
command
line.
...
-u Deprecated, equivalent to -ocpu -Otime.
Therefore:
alias top='top -ocpu -Otime'
alias topold='top -opid'
Perhaps `topold` will alias to `top -ocpu -Otime -opid`, but this
doesn't matter, as the -opid will over-ride the -ocpu.
HTH,
Stroller.
More information about the X-Unix
mailing list