* ** bug?
@ 1995-09-18 11:09 Hariharan Dhandapani
1995-09-19 4:35 ` Mark Borges
0 siblings, 1 reply; 4+ messages in thread
From: Hariharan Dhandapani @ 1995-09-18 11:09 UTC (permalink / raw)
To: zsh-workers
seems like there is a bug with the ** operator:
$ ls
api@ poll@
api and poll are actually pointers to directories
$ ls **/*.c
zsh: no matches found: **/*.c
$ ls */*.c
api/net_addr.c api/net_prop.c api/ng_ep.c poll/pb_errs.c poll/poll_sig.c
what gives? isn't this a bug?
Thanks,
hari
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ** bug?
1995-09-18 11:09 ** bug? Hariharan Dhandapani
@ 1995-09-19 4:35 ` Mark Borges
0 siblings, 0 replies; 4+ messages in thread
From: Mark Borges @ 1995-09-19 4:35 UTC (permalink / raw)
To: hari; +Cc: zsh-workers
>> Hariharan Dhandapani(HD) wrote on Mon, 18 Sep 1995 19:09:29 +0800:
HD> seems like there is a bug with the ** operator:
HD> $ ls
HD> api@ poll@
HD> api and poll are actually pointers to directories
HD> $ ls **/*.c
HD> zsh: no matches found: **/*.c
HD> what gives? isn't this a bug?
No, it's documented to work this way -- see zshexpn(1) (or search for
`**' if using an older version of zsh).
To get what you want, use the form ***/*.c
-mb-
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ** bug?
1995-09-19 3:20 Hariharan Dhandapani
@ 1995-09-19 19:02 ` Chip Salzenberg
0 siblings, 0 replies; 4+ messages in thread
From: Chip Salzenberg @ 1995-09-19 19:02 UTC (permalink / raw)
To: Hariharan Dhandapani; +Cc: zsh-workers
According to Hariharan Dhandapani:
> Thanks for all your responses, "***" does work and does what i want it
> to do, however what is the rationale behind differenitating symbolic
> links, why doesn't "**" itself follow symbolic links too ...
Following symlinks is a dangerous policy. You'll note that "find"
and similar commands usually don't follow symlinks unless they're told
to. Consider:
$ mkdir infinite
$ cd infinite
$ ln -s .. loop
Now if you follow symlinks, you have infinite/loop/infinite/loop/...
--
Chip Salzenberg, aka <chs@nando.net>
"Hey, it's the Miss Alternate Universe Pageant!"
-- Crow T. Robot, MST3K: "Stranded In Space"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ** bug?
@ 1995-09-19 3:20 Hariharan Dhandapani
1995-09-19 19:02 ` Chip Salzenberg
0 siblings, 1 reply; 4+ messages in thread
From: Hariharan Dhandapani @ 1995-09-19 3:20 UTC (permalink / raw)
To: zsh-workers
@>From zefram@dcs.warwick.ac.uk Mon Sep 18 19:23 PDT 1995
@>No, it's not a bug. ** is supposed to recurse, but not through
@>symlinks. Hence, it doesn't follow the symlinks, and in this case
@>matches nothing. ***/*.c would do what you want, as *** recurses in a
@>similar manner to ** but following symlinks.
@>
@>-zefram
Thanks for all your responses, "***" does work and does what i want it
to do, however what is the rationale behind differenitating symbolic
links, why doesn't "**" itself follow symbolic links too, it is very
difficult to write a generic script(without the proper knowledge of
whether one will hit symbolic links or not!)
Thanks,
-hari
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1995-09-19 19:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-09-18 11:09 ** bug? Hariharan Dhandapani
1995-09-19 4:35 ` Mark Borges
1995-09-19 3:20 Hariharan Dhandapani
1995-09-19 19:02 ` Chip Salzenberg
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).