Subject: Do all shells have aliases?  Is there something else that can be used?
>From: wicks@dcdmjw.fnal.gov (Matthew Wicks)
Date: Wed, 7 Oct 92 14:28:18 -0500

5.3) すべての shell で alias が使えますか。また、alias の働きをさせる他の方 法はありますか。

sh 以外のメジャーな shell は alias が使えます。ただし、それらは全て同 じ動作をするわけではありません。例えば引数を受け取れないものがあります。

厳密には同じではありせんが、shell関数(ほとんどのBourne shell型の shell にあります)は、ほとんど alias と同じ働きをします。また、shell関数は alias にできないこともできます。shell 関数は System III や BSD 4.2 の ような Version 7 UNIX から生まれたものの Bourne shell には存在しません。 BSD 4.3 と System V の shell は shell 関数をサポートしています。

aliasを解除するには unalias を、shell関数では unset を使います。


UNIX FAQ LIST / Copyright(c)1994,Ted Timar / tmatimar@isgtec.com


Maintainer: あさだ たくや