📖 WIPIVERSE

🔍 Currently registered entries: 70,060건

command (Unix)

The command utility in Unix-like operating systems is a built-in command that executes other commands without subjecting them to shell function or alias lookup. This allows the execution of a command that would otherwise be masked by a function or alias of the same name. It is most often used within shell scripts to bypass custom behavior and force the execution of the actual utility program.

command serves as a mechanism for explicit command invocation, ensuring that the desired executable is run, regardless of the existence of shell customizations. It accomplishes this by temporarily disabling the shell's function and alias lookup mechanisms for the specific command it prefixes.

Specifically, command disables the interpretation of special built-in utilities listed as part of the standard. By default, command will exit with the exit status of the command it executes. It also provides options to modify its behavior, such as returning a zero exit status even if the executed command fails.

The primary use case for command is in situations where a shell script or function has redefined a standard utility (like test or echo) and the original, standard behavior of that utility is needed. Using command ensures that the standard utility is called, rather than the redefined version. It is a powerful tool for maintaining predictable and reliable behavior within shell scripting environments.