Nori Heikkinen <[EMAIL PROTECTED]> 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
used).

I would just type cat whatever|less. It's not that much typing.

-- 
Björn Lindström <[EMAIL PROTECTED]
http://bkhl.elektrubadur.se/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to