From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6344 invoked from network); 25 Jul 2005 17:59:33 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Jul 2005 17:59:33 -0000 Received: (qmail 19496 invoked from network); 25 Jul 2005 17:59:25 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 17:59:25 -0000 Received: (qmail 19380 invoked by alias); 25 Jul 2005 17:59:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9167 Received: (qmail 19370 invoked from network); 25 Jul 2005 17:59:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Jul 2005 17:59:18 -0000 Received: (qmail 18379 invoked from network); 25 Jul 2005 17:59:18 -0000 Received: from p548526c8.dip0.t-ipconnect.de (HELO solfire) (84.133.38.200) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 17:59:13 -0000 Received: from localhost ([127.0.0.1]) by solfire with esmtp (Exim 4.42) id 1Dx7Fe-0007DT-5q; Mon, 25 Jul 2005 20:00:34 +0200 Date: Mon, 25 Jul 2005 20:00:29 +0200 (CEST) Message-Id: <20050725.200029.41628640.Meino.Cramer@gmx.de> To: phil@fifi.org Cc: zsh-users@sunsite.dk From: Meino Christian Cramer In-Reply-To: <87r7dnsvjn.fsf@ceramic.fifi.org> References: <20050724.074251.74755659.Meino.Cramer@gmx.de> <87r7dnsvjn.fsf@ceramic.fifi.org> X-Mailer: Mew version 4.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Rcpt-To: phil@fifi.org, zsh-users@sunsite.dk X-SA-Exim-Mail-From: Meino.Cramer@gmx.de Subject: Re: Command != command ??? Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 4.1+cvs (built Sat, 28 Aug 2004 13:10:40 +0200) X-SA-Exim-Scanned: Yes (on solfire) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,PLING_QUERY autolearn=no version=3.0.4 From: Philippe Troin Subject: Re: Command != command ??? Date: 24 Jul 2005 15:12:28 -0700 > Meino Christian Cramer writes: > > > Hi, > > > > In the root of the directory tree, which is filled which snapshots > > from my digicam I submitted the command: > > > > print **/*.jpg > > > > which printf out all filenames of my snaphots. FINE ! :) > > > > Then I wrote this script: > > > > #!/bin/zsh > > # gather EXIF-data > > > > if [ ! -d ./EXIF ] > > then > > mkdir ./EXIF ] > > fi > > > > for i in **/*.jpg <<<---- line 7 > > do > > echo "examine $i..." > > idx=0; > > fn=$(basename $i .jpg) > > fnex=${fn}.exif-${idx}.txt > > while [ -f ./EXIF/${fnex} ] > > do > > idx=$(( idx + 1 )) > > fnex=${fn}.exif-${idx}.txt > > done > > jhead -v $i > ./EXIF/${fnex} > > done > > > > > > which I started from the same point, where I did my > > > > print **/*.jpg > > > > but now, zsh said to me: > > > > ./mkexif.sh:7: no matches found: **/*.jpg > > You setopt extendglob in your zshrc, which is not sourced for your script. > > Either move the setopt to zshenv, or add setopt extendedglob to your > script. > > Phil. Hmmm....my script now looks like this: #!/bin/zsh setopt extendedglob if [ ! -d ./EXIF ] then mkdir ./EXIF ] fi for i in **/*.jpg <<<<<---- line 9 do echo -n "examine $i..." idx=0; fn=$(basename $i .jpg) fnex=${fn}.exif-${idx}.txt while [ -f ./EXIF/${fnex} ] do idx=$(( idx + 1 )) fnex=${fn}.exif-${idx}.txt done print "...writing ./EXIF/${fnex}" jhead -v $i > ./EXIF/${fnex} done ...but...still getting this: ./mkexif.sh:9: no matches found: **/*.jpg After all this I must confess: My confusion became now one of my lesser problems... ;O) Confused, Meino