From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21526 invoked by alias); 23 Nov 2010 08:33:53 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15570 Received: (qmail 21604 invoked from network); 23 Nov 2010 08:33:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: Aaron Davies Cc: "zsh-users\@zsh.org" Subject: Re: Glob for specific length? In-Reply-To: (Aaron Davies's message of "Mon, 22 Nov 2010 14:29:42 -0500") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Date: Tue, 23 Nov 2010 09:19:03 +0100 Message-ID: <87y68k4fm0.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Df-Sender: 430444 Aaron Davies wrote: > Is there a glob for files with names of e.g. exactly thirty > characters? sort of the equiv of /^.{30}$/ Yes. See zshexpn(1) for (#cN,M). Example: % ls -lad ls -lad /?(#c3) drwxr-xr-x 2 root root 4096 Nov 2 23:31 /bin drwxr-xr-x 15 root root 3460 Nov 22 23:12 /dev drwxr-xr-x 161 root root 12288 Nov 22 14:20 /etc drwxr-xr-x 14 root root 12288 Oct 22 09:43 /lib drwxrwxr-x 8 root staff 4096 Nov 13 22:26 /mnt drwxr-xr-x 4 root root 4096 Oct 4 11:05 /opt drwxr-xr-x 4 root root 4096 Apr 29 2010 /srv drwxr-xr-x 12 root root 0 Oct 22 09:50 /sys drwxrwxrwt 22 root root 12288 Nov 23 09:15 /tmp drwxr-xr-x 15 root root 4096 Oct 3 12:31 /usr drwxr-xr-x 16 root root 4096 Jul 1 19:41 /var Regards, Frank -- In protocol design, perfection has been reached not when there is nothing left to add, but when there is nothing left to take away. -- RFC 1925