commandएक बैश बिलिन है जैसा कि हम देख सकते हैं:
seth@host:~$ type command
command is a shell builtin
तो हमें पता commandहै कि हमारे शेल, बैश द्वारा प्रदान किया गया है। man bashहम खोदकर देख सकते हैं कि इसका उपयोग क्या है:
(से man 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 file name
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
cannot be found, the exit status is 127. Otherwise, the exit
status of the command builtin is the exit status of command.
अनिवार्य रूप से आप command"सामान्य फ़ंक्शन लुकअप" को बायपास करने के लिए उपयोग करेंगे । उदाहरण के लिए, मान लें कि आपके पास कोई फ़ंक्शन है .bashrc:
function say_hello() {
echo 'Hello!'
}
आम तौर पर, जब आप say_helloअपने टर्मिनल बैश में दौड़ते हैं, तो आपके नाम say_helloसे .bashrc पहले यह फ़ंक्शन पाया जाएगा, कहते हैं, एक एप्लिकेशन जिसका नाम है say_hello। का उपयोग करते हुए:
command say_hello
बैश बनाता है अपने सामान्य समारोह देखने बाईपास और सीधे या तो निर्माण या अपने करने के लिए जाओ $PATH। ध्यान दें कि इस फ़ंक्शन लुकअप में उपनाम भी शामिल हैं। का उपयोग करना commandदोनों कार्यों और उपनामों को बायपास करेगा।
यदि -pविकल्प प्रदान किया गया है तो bash आपके रिवाज को दरकिनार कर देता है $PATHऔर अपने डिफ़ॉल्ट का उपयोग करता है।
-vया -Vझंडे बैश वर्णन प्रिंट (के लिए कम -v, लंबे समय के लिए -Vआदेश की)।
नोट: जैसा कि स्मारकों ने टिप्पणियों में बताया है कि शेल बिल्डरों के बारे में जानकारी प्राप्त करने के लिए एक आसान तरीका यहां पाया जा सकता है: शेल बिल्ड कमांड और कीवर्ड के लिए `मैन` कैसे करें?