From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu ([128.61.1.1]) by hawkwind.utcs.toronto.edu with SMTP id <2776>; Mon, 2 Nov 1992 22:55:01 -0500 Received: from burdell.cc.gatech.edu by gatech.edu (4.1/Gatech-9.1) id AA16860 for rc@hawkwind.utcs.toronto.edu; Mon, 2 Nov 92 22:54:45 EST Received: from penfold.cc.gatech.edu by burdell.cc.gatech.edu (4.1/SMI-4.1) id AA06978; for rc@hawkwind.utcs.toronto.edu; Mon, 2 Nov 92 22:54:40 EST Received: by penfold.cc.gatech.edu (4.1/SMI-4.1) id AA11141; Mon, 2 Nov 92 22:54:12 EST Date: Mon, 2 Nov 1992 22:54:12 -0500 From: arnold@cc.gatech.edu (Arnold Robbins) Message-Id: <9211030354.AA11141@penfold.cc.gatech.edu> To: rc@hawkwind.utcs.toronto.edu Subject: file globbing > rc has convenient ways of adding things to a list, but it has > no particularly easy way of doing the converse, taking something > out of one. It would be especially powerful if one could take things > out of implicit lists, ie say 'all filenames of this pattern, except > filenames of that pattern' conveniently. The, ahem, Korn shell, has an extended pattern matching notation: *(pat1|pat2|..) zero or more of pat1, pat2, ... ?(pat1|pat2|..) one or zero of pat1, pat2, ... +(pat1|pat2|..) one or more of pat1, pat2, ... @(pat1|pat2|..) exactly one of pat1, pat2, ... !(pat1|pat2|..) anything that does not match pat1, pat2... I find the most useful to be stuff like $ ls !(*.o|core) I don't use it a lot, mostly I suspect because it's a fairly new feature. Arnold