In article <20020324.162140.35674593.JCA02266 / nifty.ne.jp>, Koji Arai <JCA02266 / nifty.ne.jp> writes: > bash で言う extglob ですかね? @(..|..|..) はい。そうです。そっか、ksh 流の方が伝わりやすいか。 zsh にも kshglob はあるし、これからはそっちで説明しよう。 > rm !(lost+found) これも ksh ですね。 > あいや、そうでした?生の csh ももう試せませんからね。うーん、 いや、csh を動かすのはごく簡単だと思いますが。 (tcsh になってしまった)FreeBSD でも /usr/ports/shells/44bsd-csh に ports がありますし。 > 単に ! も使えますと書くことにします。 ちなみに、POSIX では ! だけみたいですね。 When unquoted and outside a bracket expression, the following three characters shall have special meaning in the specification of patterns: ? A question-mark is a pattern that shall match any character. * An asterisk is a pattern that shall match multiple characters, as described in Patterns Matching Multiple Characters . [ The open bracket shall introduce a pattern bracket expression. The description of basic regular expression bracket expressions in the Base Definitions volume of IEEE Std 1003.1-2001, Section 9.3.5, RE Bracket Expression shall also apply to the pattern bracket expression, except that the exclamation mark character ( '!' ) shall replace the circumflex character ( '^' ) in its role in a "non-matching list" in the regular expression notation. A bracket expression starting with an unquoted circumflex character produces unspecified results. まぁ、POSIX sh は ksh の系譜ですから当然といえば当然なのですが。 -- [田中 哲][たなか あきら][Tanaka Akira] 「ふえろ! わかめちゃん作戦です$(C⊇」(Little Worker, 桂遊生丸)