Korn Shell Aliases

Tom Neff tneff at bfmny0.UU.NET
Thu Dec 14 05:26:38 AEST 1989


In article <1989Dec12.182809.5507 at mccc.uucp> root at mccc.uucp (Pete Holsberg) writes:
>A user on CompuServe asks if there is a way to define a Korn shell alias
>with positional parameters, a la a script.  He says that every time he
>tries a definition, the actual parameter is ignored.

Korn shell aliases do not use positional parameters.  If you include one
in an alias definition, the corresponding positional parameter from the
current environment, script or interactive environment will be
substituted.  (Aliases are always treated as if you had simply typed the
expansion string yourself instead of typing the alias.)

For a programmable abbreviation that executes fast and in the current
environment, use Korn shell functions instead.  They support positional
parameters.
-- 
"We plan absentee ownership.  I'll stick to       `o'   Tom Neff
 building ships." -- George Steinbrenner, 1973    o"o   tneff at bfmny0.UU.NET



More information about the Comp.unix.questions mailing list