# HG changeset patch # User Oleksandr Gavenko # Date 1295211850 -7200 # Node ID a6af37960954e9b91bfd8e18bcfec9002e6dc26e # Parent 76d3542698b26b5c1aaeec87cb50bb18c9f658c5# Parent 74461231e9e7618322b591885338aaf62f3664f3 Automated merge with file:///cygdrive/e/srv/hg/tips diff -r 76d3542698b2 -r a6af37960954 posix.rst --- a/posix.rst Tue Jan 04 14:06:45 2011 +0200 +++ b/posix.rst Sun Jan 16 23:04:10 2011 +0200 @@ -7,3 +7,30 @@ http://www.opengroup.org/onlinepubs/9699919799/download download page for SYSV4 + +* Shell command. + +** command. + +Main semantic is to invoke command instead defined function with same name: + + $ ls() { ls --color "$@"; } + $ ls # infinitely loop as func invoke itself + $ ls() { command ls --color "$@"; } + $ ls . # invoke /bin/ls with color output + $ unset ls # forget func definition + $ ls # invoke /bin/ls without color output + +With '-p' arg Perform the command search using a default value for PATH that +is guaranteed to find all of the standard utilities: + + $ command -p getconf PATH + + +With '-v' arg work like 'which' command which not included in POSIX: + + $ command -v ls +/usr/bin/ls + $ command -v echo # for build-in command print command itself +echo # you can check for equality or for slash to + # distinguish from utilities