mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
add u and u.rc
This commit is contained in:
parent
c3e471f477
commit
9f827afdb9
2 changed files with 56 additions and 3 deletions
11
bin/u.rc
Executable file
11
bin/u.rc
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
|
if(~ $#PLAN9 1) opath=$path i=() {
|
||||||
|
path=()
|
||||||
|
for(i in $opath){
|
||||||
|
if(! ~ $i $PLAN9/bin)
|
||||||
|
path=($path $i)
|
||||||
|
}
|
||||||
|
path=($path $PLAN9/bin)
|
||||||
|
}
|
||||||
|
! ~ $#* 0 && exec $*
|
48
man/man1/9.1
48
man/man1/9.1
|
@ -1,6 +1,6 @@
|
||||||
.TH 9 1
|
.TH 9 1
|
||||||
.SH NAME
|
.SH NAME
|
||||||
9, 9.rc \- run Plan 9 commands
|
9, 9.rc, u, u.rc \- run Plan 9 or Unix commands
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B 9
|
.B 9
|
||||||
.I cmd
|
.I cmd
|
||||||
|
@ -25,6 +25,30 @@
|
||||||
.B 9.rc
|
.B 9.rc
|
||||||
(from
|
(from
|
||||||
.IR rc (1))
|
.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
|
.SH DESCRIPTION
|
||||||
Because Plan 9 supplies commands with the same name as but different
|
Because Plan 9 supplies commands with the same name as but different
|
||||||
behavior than many basic Unix system commands
|
behavior than many basic Unix system commands
|
||||||
|
@ -63,6 +87,17 @@ is the same as
|
||||||
.I 9
|
.I 9
|
||||||
but written for use by the shell
|
but written for use by the shell
|
||||||
.IR rc (1).
|
.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
|
.SH EXAMPLES
|
||||||
Search for greek in the password file:
|
Search for greek in the password file:
|
||||||
.IP
|
.IP
|
||||||
|
@ -72,14 +107,21 @@ $ 9 grep '[α-ζ]' /etc/passwd
|
||||||
.PP
|
.PP
|
||||||
Start an
|
Start an
|
||||||
.IR rc (1)
|
.IR rc (1)
|
||||||
with the Plan 9 commands in the path before the system commands.
|
with the Plan 9 commands in the path before the system commands,
|
||||||
|
and then run the Unix
|
||||||
|
.IR ls :
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
9 rc
|
$ 9 rc
|
||||||
|
% u ls
|
||||||
.EE
|
.EE
|
||||||
.SH SOURCE
|
.SH SOURCE
|
||||||
.B \*9/bin/9
|
.B \*9/bin/9
|
||||||
.br
|
.br
|
||||||
.B \*9/bin/9.rc
|
.B \*9/bin/9.rc
|
||||||
|
.br
|
||||||
|
.B \*9/bin/u
|
||||||
|
.br
|
||||||
|
.B \*9/bin/u.rc
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.IR intro (1)
|
.IR intro (1)
|
||||||
|
|
Loading…
Reference in a new issue