File: glob.7

package info (click to toggle)
manpages-ja 0.5.0.0.20080615-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,508 kB
  • ctags: 1
  • sloc: sh: 13,690; perl: 157; makefile: 114
file content (209 lines) | stat: -rw-r--r-- 7,986 bytes parent folder | download
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
.\" Copyright (c) 1998 Andries Brouwer
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
.\" 2003-08-24 fix for / by John Kristoff + joey
.\"
.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
.\" Translated Wed 12 Aug 1998 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
.\" Updated 2003-09-28 by NAKANO Takeo
.\"
.\"WORD:	wild card pattern	磻ɥɥѥ
.\"WORD:	character class		ʸ饹
.\"WORD:	range			ΰ
.\"WORD:	complementation		佸
.\"WORD:	regular expression	ɽ
.\"WORD:	bracket expression	֥饱åɽ
.\"WORD:	collating sequence	ȹ
.\"WORD:	collating element	ȹ
.\"WORD:	current locale		ȥ
.\"WORD:	equivalence class	饹
.\"
.TH GLOB 7 2003-08-24 "Linux" "Linux Programmer's Manual"
.SH ̾
glob \- ѥ̾ glob 
.SH 
Ρ Unix V6 Ǥϡ磻ɥɥѥŸ
.I /etc/glob
ȸץबäθ夹ˡ
εǽϥȤ߹ޤ褦ˤʤä

Ǥϡεǽ桼ץफ¹ԤǤ褦
.BR glob (3)
Ȥ饤֥롼¸ߤƤ롣

glob ε§ʲ˽Ҥ٤ (POSIX.2 3.13)
.SS 磻ɥɥޥå
ʸ `?', `*', `[' ޤޤƤȡ
ϥ磻ɥɥѥȤߤʤ롣
glob פȤΤϡ磻ɥɥѥŸơ
Υѥ˥ޥåѥ̾ΥꥹȤ뤳ȤǤ롣
ޥåϰʲΤ褦롣

(֥饱åȳ) `?' Ϥñʸ˥ޥå롣

(֥饱åȳ) `*' Ϥʸ˥ޥå롣
ʸ (empty string) ˤޥå롣
.PP
.B "ʸ饹 (character class)"
.sp
`[...]' ȸɽϡƬ `[' ³ǽʸ `!' ǤʤС
֥饱åȤ˴ޤޤƤʸΤɤ줫Ĥ˥ޥå롣
֥饱åȤ˴ޤޤʸ϶ǤäƤϤʤʤ
ä `]' ǽʸ˻ꤹХ֥饱åȤ˴ޤ뤳ȤǤ롣
(Ĥޤ `[][!]'  `[', `]', `!'  3 ʸΤɤ줫˥ޥå롣)
.PP
.B "ΰ (range)"
.sp
üɽˡ¸ߤ롣`\-' 򶴤ĤʸΰȤʤ롣
(Ĥޤ `[A\-Fa\-f0\-9]'  `[ABCDEFabcdef0123456789]'
Ȥʤ롣) `\-' ʸΤΤ줿ϡ
֥饱åȤƬޤϺǸʸ˻ꤹФ褤
(Ĥޤ `[]\-]' Ĥʸ `]'  `\-'
˥ޥå`[\-\-0]'  `\-', `.', `0'  3 ʸ˥ޥå롣
δ֤ `/' ˤϥޥåʤҤ򻲾ȡ)
.PP
.B 佸 (complementation)
.sp
`[!...]' ȸɽϡ֥饱åȤ˴ޤޤʤñʸ˥ޥå
(Ƭˤ `!' Ͻ) (Ĥޤ `[!]a\-]'  `]', `a',
`\-' ʳΤ٤ƤʸΡɤ줫Ĥ˥ޥå롣)

Хåå `\e' ֤С `?', `*', `['
̾ʸȤư롣
ޤϥΥޥɥ饤ΰ˻ꤹϡ
ȤǰϤäƤƱ̤롣֥饱åȤǤϡ
ʸϤʸȤ̣롣
ʤ `[[?*\e]'  `[', `?', `*', `\e' Τɤ줫ʸ˥ޥå롣
.SS "ѥ̾ (pathname)"
glob ưϡѥ̾Τ줾ʬΩŬѤ롣
ѥ̾¸ߤ `/'  `?'  `*' 磻ɥɤˤϥޥåʤ
ޤ `[.\-0]' Τ褦ΰˤޥåʤ
ΰۤ `/' ʸޤळȤϤǤʤʸˡ顼Ȥʤ롣

`.' ǻϤޤѥ̾Ǥϡʸۤ˥ޥåʤФʤʤ
(Ĥޤ `rm *'  .profile ʤޤ `tar c *'
ǤϤ٤ƤΥեϥ֤ʤ `tar c .' ɤ)
.SS Υꥹ
Ϳ狼䤹ñʥ롼롢
֥磻ɥɥѥޥåѥ̾ΥꥹȤŸפȸΤϡ
ꥸʥ Unix ˤǤä
ϥѥ󤬶ΥꥹȤŸ뤳ȤĤƤ
.br
.nf
    xv \-wait 0 *.gif *.jpg
.fi
ˤơ*.gif ե뤬ʤǤ⡢
϶ΥꥹȤŸ뤿ᡢ顼ˤʤʤ
 POSIX ǤϡʸˡŪʤѥ䡢
ޥåʤäѥϡ
Τޤѹ줺˻Ĥ뤳ȤˤʤäƤ롣
.I bash
Ǥ
.I allow_null_glob_expansion=true
ꤹ뤳Ȥǡο񤤤ꤹ뤳ȤǤ롣

(Ʊ̤ͤΤȤǤⵯäƤ롣㤨СŤץȤˤ
.br
.nf
    rm `find . \-name "*~"`
.fi
Τ褦ʵҤϡץȤǤ
.br
.nf
    rm \-f nosuchfile `find . \-name "*~"`
.fi
Τ褦ˤʤФʤʤʤ
.I rm
ꥹȤʤǸƤӽФǽꡢ
顼åФƤޤ)
.SH 
.SS ɽ
磻ɥɥѥɽ¿Ƥ뤬ξԤϰۤʤ롣
ޤˡԤե̾˥ޥåΤФơ
ԤϥƥȤ˥ޥå롣ˡ롼ƱǤϤʤ
㤨ɽˤ `*' ϡ
֤줿ʸ 0 ʾη֤ɽ

ɽˤ֥饱åɽϤ뤬 `^' Ǥʤ롣
POSIX Ǥϥ磻ɥɥѥˤ `[^...]' ̤ǤȤƤ롣
.SS ʸ饹ȹݲ
ΰϡȤȤϤ ASCII ˤ¤Ӥ̣Ƥ
ä `[\ \-%]'  `[\ !"#$%]' ΰ̣Ǥꡢ `[a\-z]' 
֤٤Ƥξʸפΰ̣Ǥä
Unix μˤϡĥΤ¸ߤ
Ǥ X\-Y ȤΰϡX Υɤ
Y Υɤ˶ޤ줿ɤʸ٤Ƥɽ褦ˤʤäƤ
ˤϥ桼ʥƥˤ
ʸɤΤʤФʤ餺
˥ʥե٥åȤФȹ
(collating sequence) ʸɤνȰۤʤäƤˤؤǤä
(: collating sequence ˴ؤƤ
.BR regex (7)
򻲾ȤƲ)
ä POSIX Ǥϡ磻ɥɥѥɽˤơ
֥饱åɽ˳ĥƤ롣
ޤDz桹ϡ֥饱åɽˤϻĤǤޤޤ줦뤳Ȥ򸫤Ƥ
ʤ (i) ꡢ(ii) ñʸ(iii) ΰꡢλĤǤ롣
POSIX Ǥϡΰݲʤ褦Ƥꡢ
ޤĤΥפ֥饱åɽǤȤɲäƤ롣

(iii) ΰ X\-Y  X  Y ˶ޤ줿 (ξüޤ) ٤Ƥʸ̣롣
ΤȤȥ (current locale) 
.B LC_COLLATE
ƥƤȹѤ롣

(iv) ̾դʸ饹: ʲΤ褦ʤΤǤ롣
.nf

[:alnum:]  [:alpha:]  [:blank:]  [:cntrl:]
[:digit:]  [:graph:]  [:lower:]  [:print:]
[:punct:]  [:space:]  [:upper:]  [:xdigit:]

.fi
Ѥ `[a\-z]'  `[[:lower:]]' Τ褦ʻ꤬Ǥ롣
ޤǥޡΤ褦ˡե٥åȤ `z' ʹߤ
3 Ĥʸ¸ߤ褦ʾǤ⡢Ʊ褦ưԤǤ롣
ʸ饹ϥȥ
.B LC_CTYPE
ƥƤ롣

(v) ȹˤ륷ܥ: `[.ch.]'  `[.a-acute.]' Τ褦 `[.'
 `.]' Ƕޤ줿ʸϡȥ줿ȹǤȤʤ롣
ĤǤʣʸʤ⤢ꤦ뤳Ȥա

(vi) 饹ɽ (equivalence class expressions): `[=a=]'
Τ褦 `[='  `=]' ȤǶޤ줿ʸǤ롣
饹ΥСǤȹǤ٤Ƥˤʤ롣
饹ϥȥƤΤˤʤ롣
㤨С`[[=a=]]' 
`[a[.a\-acute.][.a\-grave.][.a\-umlaut.][.a\-circumflex.]]'
Ǥ
(Latin-1 ɽǤ [a\e`{a}\e'{a}\e"{a}\e^{a}] Ʊ
[] ܸ roff ڡǤ latin1 ɤФʤΤǡ
Ǥ TeX ɽǵ)
.SH Ϣ
.BR sh (1),
.BR fnmatch (3),
.BR glob (3),
.BR locale (7),
.BR regex (7)