*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> command (1)              


 command(1)                                                       command(1)

 NAME    [Toc]    [Back]
      command - execute a simple command

 SYNOPSIS    [Toc]    [Back]
      command command_name [argument ...]

 DESCRIPTION    [Toc]    [Back]
      command enables the shell to treat the arguments as a simple command,
      suppressing the shell function lookup.

      If command_name is not the name of the function, the effect of command
      is the same as omitting command.

 OPERANDS    [Toc]    [Back]
      command recognizes the following operands:

           command_name        The name of a HP-UX command or a shell
                               built-in command.

           argument            One or more strings to be interpreted as
                               arguments to command_name.

      The command command is necessary to allow functions that have the same
      name as a command to call the command (instead of a recursive call to
      the function).

      Nothing in the description of command is intended to imply that the
      command line is parsed any differently than any other simple command.
      For example,

           command a | b ; c

      is not parsed in any special way that causes | or ; to be treated
      other than a pipe operator or semicolon or that prevents function
      lookup on b or c.

 EXTERNAL INFLUENCE    [Toc]    [Back]
    Environment Variables
      PATH determines the search path used during the command search.

 RETURN VALUE    [Toc]    [Back]
      command exits with one of the following values:

           +  If command fails:

                   126     The utility specified by the command_name is
                           found but not executable.

                   127     An error occurred in the command utility or the
                           utility specified by command_name is not found.

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003

 command(1)                                                       command(1)

           +  If command does not fail:

                   The exit status of command is the same as that of the
                   simple command specified by the arguments:

                           command_name[argument ...]

 EXAMPLES    [Toc]    [Back]
      Create a version of the cd command that always prints the name of the
      new working directory whenever it is used:

           cd() {
                   command "$@" >/dev/null

      Circumvent the redefined cd command above, and change directories
      without printing the name of the new working directory:

           command cd

 SEE ALSO    [Toc]    [Back]
      getconf(1), sh-posix(1), confstr(3C).

      command: XPG4, POSIX.2

 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
array IRIX execute an array command
system Tru64 Execute a shell command
on IRIX execute a command remotely
send IRIX Execute a command in a different application
pagsh OpenBSD execute a command without authentication
system Linux execute a shell command
sudo OpenBSD execute a command as another user
uuxqt IRIX execute remote command requests
after IRIX Execute a command after a time delay
lockf FreeBSD execute a command while holding a file lock
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service