APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Command


© December 2003 Tony Lawrence

This is a safety net. You can use it to make double-dog sure that you are not accidentally invoking some function. For example, suppose we redefine "sort" in bash:

function sort {
echo "Not today"
}
 

After this, trying to sort a file doesn't do much:

 apl$ sort t
 not today
 

But "command sort t" will work.

"command" can also just tell you what would be used:

apl$ command -V sort
sort is a function
sort () 
{ 
    echo "Not today"
}
 

It can also help if you think your PATH might be screwy:

~ apl$ PATH=./bin
~ apl$ sort t
bash: sort: command not found
~ apl$ command -p sort t

abc
abc
abc
def
def
def
foo
geh
geh
geh


Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> command


Inexpensive and informative Apple related e-books:

Take Control of High Sierra

Take Control of IOS 11

Take Control of iCloud

Photos: A Take Control Crash Course

iOS 10: A Take Control Crash Course




More Articles by © Tony Lawrence




Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





The people I distrust most are those who want to improve our lives but have only one course of action in mind. (Frank Herbert)




Linux posts

Troubleshooting posts


This post tagged:

Scripting

Shell

UnixWords



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode





SCO Unix Sales, Support, & Service

Phone:  707-SCO-UNIX (707-726-8649Toll Free: 833-SCO-UNIX (833-726-8649)
www.SCOsales.com