aboutsummaryrefslogtreecommitdiff
path: root/man/man1/9.1
blob: e003eb31740fdceddb0ca70fedac31252073f610 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
.TH 9 1
.SH NAME
9, 9.rc, u, u.rc \- run Plan 9 or Unix commands
.SH SYNOPSIS
.B 9
.I cmd
[
.I args
\&...
]
.PP
.B .
.B 9
(from
.IR sh (1))
.PP
.B 9.rc
.I cmd
[
.I args
\&...
]
.PP
.B .
.B 9.rc
(from
.IR rc (1))
.PP
.B u
.I cmd
[
.I args
\&...
]
.PP
.B .
.B u
(from
.IR sh (1))
.PP
.B u.rc
.I cmd
[
.I args
\&...
]
.PP
.B .
.B u.rc
(from
.IR rc (1))
.SH DESCRIPTION
Because Plan 9 supplies commands with the same name as but different
behavior than many basic Unix system commands
(e.g.,
.BR grep ,
.BR sed ,
.BR mkdir ,
.BR rm ),
it is not recommended to run with the Plan 9 bin directory
ahead of the system directories.
.PP
.I 9
is a shell script that sets up a Plan 9 environment and runs
.I cmd .
It sets
.B $PLAN9
if necessary
and adds
.B $PLAN9/bin
to the beginning of
.B $PATH
before running
.IR cmd .
.PP
If run with no arguments,
.B 9
does not do anything, so it can be invoked from
.IR sh -style
shells using
.B .
.B 9
in order to make the current shell start running in the Plan 9 environment.
.PP
.I 9.rc
is the same as
.I 9
but written for use by the shell
.IR rc (1).
.PP
.I U
and
.I u.rc
are the inverse of
.I 9
and
.IR 9.rc :
they move
.B $PLAN9/bin
to the end of the path.
.SH EXAMPLES
Search for greek in the password file:
.IP
.EX
$ 9 grep '[α-ζ]' /etc/passwd
.EE
.PP
Start an
.IR rc (1)
with the Plan 9 commands in the path before the system commands,
and then run the Unix
.IR ls :
.IP
.EX
$ 9 rc
% u ls
.EE
.SH SOURCE
.B \*9/bin/9
.br
.B \*9/bin/9.rc
.br
.B \*9/bin/u
.br
.B \*9/bin/u.rc
.SH SEE ALSO
.IR intro (1)