Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Command != command ???
- X-seq: zsh-users 9178
- From: Meino Christian Cramer <Meino.Cramer@xxxxxx>
- To: phil@xxxxxxxx
- Subject: Re: Command != command ???
- Date: Tue, 26 Jul 2005 02:33:19 +0200 (CEST)
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <87oe8qh5qh.fsf@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <8764uyitfr.fsf@xxxxxxxxxxxxxxxx> <20050725.213536.78705211.Meino.Cramer@xxxxxx> <87oe8qh5qh.fsf@xxxxxxxxxxxxxxxx>
From: Philippe Troin <phil@xxxxxxxx>
Subject: Re: Command != command ???
Date: 25 Jul 2005 15:37:42 -0700
> Meino Christian Cramer <Meino.Cramer@xxxxxx> writes:
>
> > From: Philippe Troin <phil@xxxxxxxx>
> > Subject: Re: Command != command ???
> > Date: 25 Jul 2005 12:20:24 -0700
> >
> > > Meino Christian Cramer <Meino.Cramer@xxxxxx> writes:
> > >
> > > > From: Philippe Troin <phil@xxxxxxxx>
> > > > 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author