9 votos

¿Donde puedo encontrar toda la documentación de mac ' comandos de shell builtin s?

El OS X Páginas Man muestra la lista de todas las funciones integradas. Pero donde puedo encontrar la documentación de una en particular?

Por ejemplo, el comando fc, en ubuntu puedo conseguir el manual:

> help fc
fc: fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]
Display or execute commands from the history list.

fc is used to list or edit and re-execute commands from the history list.
FIRST and LAST can be numbers specifying the range, or FIRST can be a
string, which means the most recent command beginning with that
string.
....

Otro ejemplo es el if expresión, en ubuntu:

> help if
if: if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi
Execute commands based on conditional.
...

Lo que me estoy perdiendo aquí?

11voto

Louis Hugues Puntos 151

Haces exactamente lo mismo.

So...

$ help if
if: if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi
    The `if COMMANDS' list is executed.  If its exit status is zero, then the
    `then COMMANDS' list is executed.  Otherwise, each `elif COMMANDS' list is
    executed in turn, and if its exit status is zero, the corresponding
    `then COMMANDS' list is executed and the if command completes.  Otherwise,
    the `else COMMANDS' list is executed, if present.  The exit status of the
    entire construct is the exit status of the last command executed, or zero
    if no condition tested true.

O...

$ help fc
fc: fc [-e ename] [-nlr] [first] [last] or fc -s [pat=rep] [cmd]
    fc is used to list or edit and re-execute commands from the history list.
    FIRST and LAST can be numbers specifying the range, or FIRST can be a
    string, which means the most recent command beginning with that
    string.

       -e ENAME selects which editor to use.  Default is FCEDIT, then EDITOR,
          then vi.

       -l means list lines instead of editing.
       -n means no line numbers listed.
       -r means reverse the order of the lines (making it newest listed first).

    With the `fc -s [pat=rep ...] [command]' format, the command is
    re-executed after the substitution OLD=NEW is performed.

    A useful alias to use with this is r='fc -s', so that typing `r cc'
    runs the last command beginning with `cc' and typing `r' re-executes
    the last command.

AppleAyuda.com

AppleAyuda es una comunidad de usuarios de los productos de Apple en la que puedes resolver tus problemas y dudas.
Puedes consultar las preguntas de otros usuarios, hacer tus propias preguntas o resolver las de los demás.

Powered by:

X