command

Official Description

Executes command and eliminates functions from search order.

Syntax

command [-pvV] command_to_be_executed [args_to_command...]

Options

-p uses the PATH variable to locate command.

-vV both request that the whence command be used to locate the command to be executed.

Oddities

Available in ksh93 and beyond.

Example

 $ function ls { # Create function named ls (executes date command) > date > } $ $ ls # Function ls is found before ls command Sun Nov 26 13:55:57 EST 2000 $ $ command ls # The command command says execute the command, # not the function ! core locate_command newfile2 oldsedtest1 sedtest1 sortfile2 Mail f1 lotsofiles ob oldsedtest2 sedtest2 symstats buzz f2 mbox obr oldsedtest3 sedtest3 temp buzz1 funca ...

Get Korn Shell Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.