Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Command != command ???



Meino Christian Cramer <Meino.Cramer@xxxxxx> writes:

> From: Philippe Troin <phil@xxxxxxxx>
> Subject: Re: Command != command ???
> Date: 25 Jul 2005 15:37:42 -0700
> 
> > 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. 

What zsh version (print $ZSH_VERSION)?
Can you run an strace on the script (strace globtest2)?
What does 'print -l **/*' say?
 
> 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 ?

Yes, no problems...

Phil.



Messages sorted by: Reverse Date, Date, Thread, Author