9, 9.rc, u, u.rc – run Plan 9 or Unix commands|
9 cmd [ args ... ]
. 9 (from sh(1))
9.rc cmd [ args ... ]
. 9.rc (from rc(1))
u cmd [ args ... ]
. u (from sh(1))
u.rc cmd [ args ... ]
. u.rc (from rc(1))|
Because Plan 9 supplies commands with the same name as but different
behavior than many basic Unix system commands (e.g., grep, sed,
mkdir, rm), it is not recommended to run with the Plan 9 bin directory
ahead of the system directories.
9 is a shell script that sets up a Plan 9 environment and runs
cmd . It sets $PLAN9 if necessary and adds $PLAN9/bin to the beginning
of $PATH before running cmd.
If run with no arguments, 9 does not do anything, so it can be
invoked from sh-style shells using . 9 in order to make the current
shell start running in the Plan 9 environment.
9.rc is the same as 9 but written for use by the shell rc(1).
U and u.rc are the inverse of 9 and 9.rc: they move $PLAN9/bin
to the end of the path.|
Search for greek in the password file:|
Start an rc(1) with the Plan 9 commands in the path before the
system commands, and then run the Unix ls:
$ 9 grep '[α−ζ]' /etc/passwd|
Some shell configurations (notably, oh-my-zsh) define 9 as an
alias for cd –9, which makes the 9 command described here inaccessible.
In such shells, it is necessary to unalias 9 in your initialization