Bashの組み込み関数のマニュアルページを読む方法は? [コピー]

Bashの組み込み関数のマニュアルページを読む方法は? [コピー]

したがって、「exec」がどのように機能するかを調べる必要があります。しかし、そうすると、man execbashの組み込み機能が何であるかを説明する99%の役に立たないマニュアルページが表示されます。もちろん、他の多くのマニュアルページ(cd、chdirなど)でもこれを行います。

組み込みのマニュアルページではなく、興味のある実際のユーティリティのマニュアルページをどのように見つけますか?

私のOSはMac OSXですが、他のOSにもこの機能があります。

ベストアンサー1

シェル組み込みコマンドのドキュメントは、コマンドを使用して入手できます help。たとえば、

$ help exec
exec: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
    Replace the shell with the given command.

    Execute COMMAND, replacing this shell with the specified program.
    ARGUMENTS become the arguments to COMMAND.  If COMMAND is not specified,
    any redirections take effect in the current shell.

    Options:
      -a name   pass NAME as the zeroth argument to COMMAND
      -c                execute COMMAND with an empty environment
      -l                place a dash in the zeroth argument to COMMAND

    If the command cannot be executed, a non-interactive shell exits, unless
    the shell option `execfail' is set.

    Exit Status:
    Returns success unless COMMAND is not found or a redirection error occurs.

それ以外の場合は、それを実行してman bashから検索することができます(/\bexec\bこの場合、似ていないポケットベルを想定して入力できます)。

おすすめ記事