Re: Alias help needed
Nori Heikkinen <email@example.com> writes:
> on Wed, 03 Dec 2003 01:57:17PM -0500, Bob Tilley (AT&T) insinuated:
>> I wish to use the expression "catl <filename>" to execute the
>> commands "cat <filename> | less".
>> Is it possible to use 'alias' in the definition?
>> "alias catl='cat $0 | less'" seems like a good idea, but I don't
>> know if the '$0' works in a simple alias.
> why don't you just use "less filename"?
Maybe he actually wants to concatenate the files, rather than see them
one at a time, which is what less(1) does.
Though $0 still wont work, since that is the name of the script. You
might want to do a function and use $* or $@ (depending on what shell is
I would just type cat whatever|less. It's not that much typing.
Björn Lindström <firstname.lastname@example.org