#, fuzzy msgid "" msgstr "" "Project-Id-Version: man-pages-l10n VERSION\n" "POT-Creation-Date: 2014-07-17 17:57+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: man-pages/man7/glob.7:26 #, no-wrap msgid "GLOB" msgstr "" #. type: TH #: man-pages/man7/glob.7:26 #, no-wrap msgid "2012-07-28" msgstr "" #. type: TH #: man-pages/man7/glob.7:26 #, no-wrap msgid "Linux" msgstr "" #. type: TH #: man-pages/man7/glob.7:26 #, no-wrap msgid "Linux Programmer's Manual" msgstr "" #. type: SH #: man-pages/man7/glob.7:27 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:29 msgid "glob - globbing pathnames" msgstr "" #. type: SH #: man-pages/man7/glob.7:29 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:34 msgid "" "Long ago, in UNIX\\ V6, there was a program I that would expand " "wildcard patterns. Soon afterward this became a shell built-in." msgstr "" #. type: Plain text #: man-pages/man7/glob.7:38 msgid "" "These days there is also a library routine B(3) that will perform " "this function for a user program." msgstr "" #. type: Plain text #: man-pages/man7/glob.7:40 msgid "The rules are as follows (POSIX.2, 3.13)." msgstr "" #. type: SS #: man-pages/man7/glob.7:40 #, no-wrap msgid "Wildcard matching" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:47 msgid "" "A string is a wildcard pattern if it contains one of the characters " "\\(aq?\\(aq, \\(aq*\\(aq or \\(aq[\\(aq. Globbing is the operation that " "expands a wildcard pattern into the list of pathnames matching the pattern. " "Matching is defined by:" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:49 msgid "A \\(aq?\\(aq (not between brackets) matches any single character." msgstr "" #. type: Plain text #: man-pages/man7/glob.7:52 msgid "" "A \\(aq*\\(aq (not between brackets) matches any string, including the empty " "string." msgstr "" #. type: Plain text #: man-pages/man7/glob.7:54 msgid "B" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:63 msgid "" "An expression \"I<[...]>\" where the first character after the leading " "\\(aq[\\(aq is not an \\(aq!\\(aq matches a single character, namely any of " "the characters enclosed by the brackets. The string enclosed by the " "brackets cannot be empty; therefore \\(aq]\\(aq can be allowed between the " "brackets, provided that it is the first character. (Thus, \"I<[][!]>\" " "matches the three characters \\(aq[\\(aq, \\(aq]\\(aq and \\(aq!\\(aq.)" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:65 msgid "B" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:76 msgid "" "There is one special convention: two characters separated by \\(aq-\\(aq " "denote a range. (Thus, \"I<[A-Fa-f0-9]>\" is equivalent to " "\"I<[ABCDEFabcdef0123456789]>\".) One may include \\(aq-\\(aq in its " "literal meaning by making it the first or last character between the " "brackets. (Thus, \"I<[]-]>\" matches just the two characters \\(aq]\\(aq " "and \\(aq-\\(aq, and \"I<[--0]>\" matches the three characters \\(aq-\\(aq, " "\\(aq.\\(aq, \\(aq0\\(aq, since \\(aq/\\(aq cannot be matched.)" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:78 msgid "B" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:84 msgid "" "An expression \"I<[!...]>\" matches a single character, namely any character " "that is not matched by the expression obtained by removing the first " "\\(aq!\\(aq from it. (Thus, \"I<[!]a-]>\" matches any single character " "except \\(aq]\\(aq, \\(aqa\\(aq and \\(aq-\\(aq.)" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:91 msgid "" "One can remove the special meaning of \\(aq?\\(aq, \\(aq*\\(aq and " "\\(aq[\\(aq by preceding them by a backslash, or, in case this is part of a " "shell command line, enclosing them in quotes. Between brackets these " "characters stand for themselves. Thus, \"I<[[?*\\e]>\" matches the four " "characters \\(aq[\\(aq, \\(aq?\\(aq, \\(aq*\\(aq and \\(aq\\e\\(aq." msgstr "" #. type: SS #: man-pages/man7/glob.7:91 #, no-wrap msgid "Pathnames" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:98 msgid "" "Globbing is applied on each of the components of a pathname separately. A " "\\(aq/\\(aq in a pathname cannot be matched by a \\(aq?\\(aq or \\(aq*\\(aq " "wildcard, or by a range like \"I<[.-0]>\". A range cannot contain an " "explicit \\(aq/\\(aq character; this would lead to a syntax error." msgstr "" #. type: Plain text #: man-pages/man7/glob.7:103 msgid "" "If a filename starts with a \\(aq.\\(aq, this character must be matched " "explicitly. (Thus, I will not remove .profile, and I " "will not archive all your files; I is better.)" msgstr "" #. type: SS #: man-pages/man7/glob.7:103 #, no-wrap msgid "Empty lists" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:109 msgid "" "The nice and simple rule given above: \"expand a wildcard pattern into the " "list of matching pathnames\" was the original UNIX definition. It allowed " "one to have patterns that expand into an empty list, as in" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:112 #, no-wrap msgid " xv -wait 0 *.gif *.jpg\n" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:122 msgid "" "where perhaps no *.gif files are present (and this is not an error). " "However, POSIX requires that a wildcard pattern is left unchanged when it is " "syntactically incorrect, or the list of matching pathnames is empty. With " "I one can force the classical behavior using this command:" msgstr "" #. In Bash v1, by setting allow_null_glob_expansion=true #. type: Plain text #: man-pages/man7/glob.7:125 #, no-wrap msgid " shopt -s nullglob\n" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:128 msgid "" "(Similar problems occur elsewhere. For example, where old scripts have" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:131 #, no-wrap msgid " rm \\`find . -name \"*~\"\\`\n" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:134 msgid "new scripts require" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:137 #, no-wrap msgid " rm -f nosuchfile \\`find . -name \"*~\"\\`\n" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:142 msgid "" "to avoid error messages from I called with an empty argument list.)" msgstr "" #. type: SH #: man-pages/man7/glob.7:142 #, no-wrap msgid "NOTES" msgstr "" #. type: SS #: man-pages/man7/glob.7:143 #, no-wrap msgid "Regular expressions" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:150 msgid "" "Note that wildcard patterns are not regular expressions, although they are a " "bit similar. First of all, they match filenames, rather than text, and " "secondly, the conventions are not the same: for example, in a regular " "expression \\(aq*\\(aq means zero or more copies of the preceding thing." msgstr "" #. type: Plain text #: man-pages/man7/glob.7:154 msgid "" "Now that regular expressions have bracket expressions where the negation is " "indicated by a \\(aq^\\(aq, POSIX has declared the effect of a wildcard " "pattern \"I<[^...]>\" to be undefined." msgstr "" #. type: SS #: man-pages/man7/glob.7:154 #, no-wrap msgid "Character classes and internationalization" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:172 msgid "" "Of course ranges were originally meant to be ASCII ranges, so that \"I<[\\ -" "%]>\" stands for \"I<[\\ !\"#$%]>\" and \"I<[a-z]>\" stands for \"any " "lowercase letter\". Some UNIX implementations generalized this so that a " "range X-Y stands for the set of characters with code between the codes for X " "and for Y. However, this requires the user to know the character coding in " "use on the local system, and moreover, is not convenient if the collating " "sequence for the local alphabet differs from the ordering of the character " "codes. Therefore, POSIX extended the bracket notation greatly, both for " "wildcard patterns and for regular expressions. In the above we saw three " "types of items that can occur in a bracket expression: namely (i) the " "negation, (ii) explicit single characters, and (iii) ranges. POSIX " "specifies ranges in an internationally more useful way and adds three more " "types:" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:178 msgid "" "(iii) Ranges X-Y comprise all characters that fall between X and Y " "(inclusive) in the current collating sequence as defined by the " "B category in the current locale." msgstr "" #. type: Plain text #: man-pages/man7/glob.7:180 msgid "(iv) Named character classes, like" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:185 #, no-wrap msgid "" "[:alnum:] [:alpha:] [:blank:] [:cntrl:]\n" "[:digit:] [:graph:] [:lower:] [:print:]\n" "[:punct:] [:space:] [:upper:] [:xdigit:]\n" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:194 msgid "" "so that one can say \"I<[[:lower:]]>\" instead of \"I<[a-z]>\", and have " "things work in Denmark, too, where there are three letters past \\(aqz\\(aq " "in the alphabet. These character classes are defined by the B " "category in the current locale." msgstr "" #. type: Plain text #: man-pages/man7/glob.7:200 msgid "" "(v) Collating symbols, like \"I<[.ch.]>\" or \"I<[.a-acute.]>\", where the " "string between \"I<[.>\" and \"I<.]>\" is a collating element defined for " "the current locale. Note that this may be a multicharacter element." msgstr "" #. type: Plain text #: man-pages/man7/glob.7:208 msgid "" "(vi) Equivalence class expressions, like \"I<[=a=]>\", where the string " "between \"I<[=>\" and \"I<=]>\" is any collating element from its " "equivalence class, as defined for the current locale. For example, \"I<[[=a=" "]]>\" might be equivalent to \"I<[a\\('a\\(`a\\(:a\\(^a]>\", that is, to " "\"I<[a[.a-acute.][.a-grave.][.a-umlaut.][.a-circumflex.]]>\"." msgstr "" #. type: SH #: man-pages/man7/glob.7:208 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:214 msgid "B(1), B(3), B(3), B(7), B(7)" msgstr "" #. type: SH #: man-pages/man7/glob.7:214 #, no-wrap msgid "COLOPHON" msgstr "" #. type: Plain text #: man-pages/man7/glob.7:222 msgid "" "This page is part of release 3.70 of the Linux I project. A " "description of the project, information about reporting bugs, and the latest " "version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/" "." msgstr ""