TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:17715] Aliasing



On Tue, May 16, 2000 at 10:44:59AM -0500, Nick.T.Reinking@supervalu.com wrote:
> Woo!  My first real question!
> 
> I always forget that I'm on Solaris, and I was wanting
> to alias 'ps aux' to 'ps -ef' - but I can't get anything to work.
> 
I don't know any easy way to get alias to work with commands with spaces 
in them.

I think you'll have to write a small script in your favorite language
to do the translation for you ( or download the GNU version of
ps). Something like :

#!/bin/sh

if [ $1="aux" ]
  then
        param="-ef"
  else
        param=$1
fi

ps $param


So, to fix your immediate problem, just put a script like
the one above in your path before the Sun version and call
it ps.

-- 
Jim Crumley                 |
crumley@belka.space.umn.edu |
Work: 612 624-6804 or -0378 |