O que o comando “comando” faz? [duplicado]

0
    

Esta pergunta já tem uma resposta aqui:

    
  •              O que é o uso do comando: 'command'?                                      5 respostas                          
  •         
  •              Como faço para obter ajuda para “echo” ou outro programa? comandos?                                      4 respostas                          
  •     

Recentemente descobri acidentalmente que command é um comando, mas digitar --help ou -h depois parece dar resultados parecidos com isso:

bash: command: --: invalid option
command: usage: command [-pVv] command [arg ...]

Não tem manpage , não é um pacote separado em si, e não consigo descobrir em qual pacote ele está nem o que ele faz ... Estou executando o Ubuntu GNOME 15.10 com o GNOME 3.18. Então, o que o comando command faz? E como usá-lo?

    
por muru 24.01.2016 / 23:29

1 resposta

2

Na página de manual do 'bash':

  command [-pVv] command [arg ...]
          Run  command  with  args  suppressing  the normal shell function
          lookup. Only builtin commands or commands found in the PATH  are
          executed.   If the -p option is given, the search for command is
          performed using a default value for PATH that is  guaranteed  to
          find  all  of  the  standard  utilities.  If either the -V or -v
          option is supplied, a description of command is printed.  The -v
          option  causes  a single word indicating the command or filename
          used to invoke command to be displayed; the -V option produces a
          more  verbose  description.  If the -V or -v option is supplied,
          the exit status is 0 if command was found, and  1  if  not.   If
          neither option is supplied and an error occurred or command can‐
          not be found, the exit status is 127.  Otherwise, the exit  sta‐
          tus of the command builtin is the exit status of command.
    
por Kevin Kenny 25.01.2016 / 04:35