zsh-users
 help / color / mirror / code / Atom feed
From: John.Cooper@Eng.Sun.COM (John S Cooper)
To: P.Stephenson@swansea.ac.uk
Cc: John.Cooper@Eng.Sun.COM (John S Cooper),
	Sam Falkner <sam@steel.Central.Sun.COM>,
	zsh-users@math.gatech.edu (Zsh users list)
Subject: Re: how can I skip globbing through SCCS subdirs?
Date: Fri, 10 Nov 1995 11:09:41 -0800	[thread overview]
Message-ID: <199511101909.LAA08306@kontiki.Eng.Sun.COM> (raw)
In-Reply-To: <26908.9511100853@pygmy.swan.ac.uk>

>> P Stephenson writes:

 Peter> This means you can exclude SCCS directories like this:
 Peter> ls **/*.c~(*/)#SCCS/*

 Peter> The (*/)# is a trick so that top level SCCS directories are
 Peter> ignored as well as any /SCCS/ bits in the middle somewhere.

Marvellous!  that seems to work great.

This also seems to be equivalent:

ls **/*.[ch]~**SCCS/*

Interestingly, using `time' indicates that the form above spends less
time in the system, but more time in user space.  (I ran the experiment
multiple times and the results below are pretty representative of a
rough average)

/bin/ls **/*.[ch]~**SCCS/*: 0.89s(r) 0.37s(u) 0.19s(s) (63%)

/bin/ls **/*.[ch]~(/*)#SCCS/*: 0.99s(r) 0.15s(u) 0.28s(s) (43%)

Should there be any performance difference between using **SCCS and
(/*)#SCCS ?


Is the exclusion pattern (to the right of the ~) evaluated once per file
that matches the left hand side, or is it evaluated for everything, and
then somehow merged with the output of the left side?

Would it be more efficient to narrow the scope of the exclusion by using
this?:

ls **/*.[ch]~**SCCS/*.[ch]

[ Again, please copy me on any replies, since I'm not on the alias ]

Thanks,

    --- John.


      reply	other threads:[~1995-11-10 20:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199511100311.TAA07019@kontiki.Eng.Sun.COM>
1995-11-10  8:53 ` P.Stephenson
1995-11-10 19:09   ` John S Cooper [this message]

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=199511101909.LAA08306@kontiki.Eng.Sun.COM \
    --to=john.cooper@eng.sun.com \
    --cc=P.Stephenson@swansea.ac.uk \
    --cc=sam@steel.Central.Sun.COM \
    --cc=zsh-users@math.gatech.edu \
    /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).