zsh-users
 help / color / mirror / code / Atom feed
From: Meino Christian Cramer <Meino.Cramer@gmx.de>
To: phil@fifi.org
Cc: zsh-users@sunsite.dk
Subject: Re: Command != command ???
Date: Tue, 26 Jul 2005 02:33:19 +0200 (CEST)	[thread overview]
Message-ID: <20050726.023319.41198250.Meino.Cramer@gmx.de> (raw)
In-Reply-To: <87oe8qh5qh.fsf@ceramic.fifi.org>

From: Philippe Troin <phil@fifi.org>
Subject: Re: Command != command ???
Date: 25 Jul 2005 15:37:42 -0700

> Meino Christian Cramer <Meino.Cramer@gmx.de> writes:
> 
> > From: Philippe Troin <phil@fifi.org>
> > Subject: Re: Command != command ???
> > Date: 25 Jul 2005 12:20:24 -0700
> > 
> > > Meino Christian Cramer <Meino.Cramer@gmx.de> writes:
> > > 
> > > > From: Philippe Troin <phil@fifi.org>
> > > > Subject: Re: Command != command ???
> > > > Date: 25 Jul 2005 11:24:56 -0700
> > > > 
> > > > Script started on Mon Jul 25 20:43:47 2005
> > > > 
> > > > cat ./globtest
> > > > 
> > > > 
> > > > #!/bin/zsh
> > > > setopt extendedglob
> > > > print -l **/*.jpg
> > > > 
> > > > 
> > > > 
> > > > 
> > > > /bin/zsh -x ./globtest
> > > 
> > > 8< snip >8
> > > 
> > > Nothing suspicious here...
> > > 
> > > Do you have any .jpg files under the cwd? i.e., what does 
> > > 
> > >  find . "*.jpg"
> > > 
> > > say?
> > > 
> > > Phil.
> > > 
> > 
> > Under . there are directories containing jpgs, yes. 
> > 
> > Even
> > 
> > 		print -l **/*.jpg
> > 
> > from the command line prints all of them.
> > 
> > The command
> > 
> > 	   find . "*.jpg"
> > 
> > prints everything under . but
> > 
> > 	   find . -name '*.jpg'
> > 
> > gives the same output as 
> > 
> > 		print -l **/*.jpg
> 
> Mmh...
> 
> What about this script:
> 
> 	#!/bin/zsh
> 	print "### pwd"
>         pwd
>         command pwd
> 	print "### find"
>         find . -name "*.jpg"
>         print "### glob"
>         print -l **/*.jpg
> 
> What's the output?
> 
> Phil.
> 

It prints:

------------------------------------------------------------------
### pwd
/home/mccramer/data/pool10
/home/mccramer/data/pool10
### find
.
.
.
<print of the jpg-files>
.
.
.
### glob
------------------------------------------------------------------


The
"------------------------------------------------------------------"'s
are added by myself. After "### glob" there is following nothing
printed to stdout. To stderr there is the known error message:

		./globtest2:8: no matches found: **/*.jpg

(I called that script "globtest2"....)


Normally, in the root of the dirtree, where the jpgs are, there is no
jpg, but in the tree under the root there are jpgs (root ==
"/home/mccramer/data/pool10").

Now I did a 

	touch "test.jpg"

in the root and run the script again.
Now, this single fake jpg in the root was found by the glob pattern
'**/*.jpg'...but nothing else. 

By the way: What happens, when you run this script on your machine in
a similiar environment/ under similiar conditions, Phil? Does it work
for you ?

Meino


  reply	other threads:[~2005-07-26  0:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-24  5:42 Meino Christian Cramer
2005-07-24 22:12 ` Philippe Troin
2005-07-24 23:22   ` Bart Schaefer
2005-07-25  3:06   ` Meino Christian Cramer
2005-07-25  3:32     ` Philippe Troin
2005-07-25  3:45       ` Meino Christian Cramer
2005-07-25  4:14         ` Philippe Troin
2005-07-25 16:06           ` Meino Christian Cramer
2005-07-25  3:54       ` Bart Schaefer
2005-07-25  4:15         ` Philippe Troin
2005-07-25 18:00   ` Meino Christian Cramer
2005-07-25 18:24     ` Philippe Troin
2005-07-25 18:53       ` Meino Christian Cramer
2005-07-25 19:20         ` Philippe Troin
2005-07-25 19:35           ` Meino Christian Cramer
2005-07-25 22:37             ` Philippe Troin
2005-07-26  0:33               ` Meino Christian Cramer [this message]
2005-07-26  2:21                 ` Philippe Troin
2005-07-26  4:20                 ` Sami Samhuri
2005-07-27 18:25                   ` Meino Christian Cramer
2005-07-26  5:07                 ` Bart Schaefer
2005-07-27  2:50                   ` Meino Christian Cramer
2005-07-26 10:28                 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050726.023319.41198250.Meino.Cramer@gmx.de \
    --to=meino.cramer@gmx.de \
    --cc=phil@fifi.org \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).