posix.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 02 Jun 2012 12:01:17 +0300
changeset 1286 21e761949f80
parent 774 74461231e9e7
permissions -rw-r--r--
Uninstalling unused packages.

-*- mode: outline -*-

* Download POSIX.

  http://www.opengroup.org/onlinepubs/009695399/download
                download page for SYSV3

  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