From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19385 invoked from network); 23 Jul 2004 22:58:06 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Jul 2004 22:58:06 -0000 Received: (qmail 97686 invoked from network); 23 Jul 2004 22:58:00 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Jul 2004 22:58:00 -0000 Received: (qmail 19794 invoked by alias); 23 Jul 2004 22:57:16 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7750 Received: (qmail 19784 invoked from network); 23 Jul 2004 22:57:16 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 23 Jul 2004 22:57:16 -0000 Received: (qmail 96209 invoked from network); 23 Jul 2004 22:55:18 -0000 Received: from erouter1.it-datacntr.louisville.edu (136.165.5.195) by a.mx.sunsite.dk with SMTP; 23 Jul 2004 22:55:15 -0000 Received: from savgw-out.louisville.edu (savgw-out.louisville.edu [136.165.2.38]) by erouter1.it-datacntr.louisville.edu (Postfix) with SMTP id 0ABA011E2 for ; Fri, 23 Jul 2004 18:55:14 -0400 (EDT) Received: from netmail.louisville.edu ([136.165.5.76]) by savgw-out.louisville.edu (SAVSMTP 3.1.5.43) with SMTP id M2004072318535925759 for ; Fri, 23 Jul 2004 18:53:59 -0400 Received: from louisville.edu agdavi01@netmail.louisville.edu [12.220.223.80] by netmail.louisville.edu with NetMail SMTP Agent $Revision: 3.22.1.5 $ on Linux via secured & encrypted transport (TLS); Fri, 23 Jul 2004 18:55:13 -0400 Date: Fri, 23 Jul 2004 18:55:09 -0400 Subject: Re: zsh tips plea (tip of the day) Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v553) From: Aaron Davies To: zsh-users@sunsite.dk Content-Transfer-Encoding: 7bit In-Reply-To: <4100F8E4.2090501@our-own.net> Message-Id: <593082B4-DCFB-11D8-8D29-000502631FBD@louisville.edu> X-Mailer: Apple Mail (2.553) X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: ** X-Spam-Status: No, hits=2.4 required=6.0 tests=FROM_ENDS_IN_NUMS, RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 2.4 On Friday, July 23, 2004, at 07:39 AM, Joakim Ryden wrote: > Peter Stephenson wrote: > >> zzapper wrote: >> >>> As this group's been a bit quiet lately, my plea would be for you >>> experts to occasionally post a tip, or explain some aspect of zsh. > >> The usual way of getting these is to post questions... > > OK - here's a question... ;) What's a really cool thing you have done > with zsh recently? Or if you will... a few lines about "how I was able > to solve my issue using zsh" (yes, I was a high school teacher in a > previous life). This isn't really recent, but probably the most common thing I do in zsh that can't be done anywhere else is use the advanced globbing stuff. For instance, I have a (fairly large) directory tree that I use to categorize and store incoming files that need to be processed, after which they get moved to archival directories through symlinks located in each "leaf" directory. Determining whether I have any files waiting for processing thus involves doing a recursive check for plain files only below the root of this tree. In bash, this would either be a significant amount of shell scripting effort or a rather ugly "find" command. (I hate find.) In zsh, it's "ls **/*(.)". Isn't that nice? -- __ __ / ) / ) /--/ __. .__ ______ / / __. , __o _ _ / (_(_/|_/ (_(_) / (_ (__/_(_/|_\/ <__