zsh-users
 help / color / mirror / code / Atom feed
From: Phil Pennock <Phil.Pennock@globnix.org>
To: zsh-users@sunsite.dk
Subject: Re: how to?
Date: Tue, 27 Aug 2002 19:20:20 +0200	[thread overview]
Message-ID: <20020827192020.A7905@globnix.org> (raw)
In-Reply-To: <20020827103427.GJ21595@freepuppy.bellavista.cz>; from neuhauser@bellavista.cz on Tue, Aug 27, 2002 at 12:34:27PM +0200

[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]

On 2002-08-27 at 12:34 +0200, Roman Neuhauser wrote:
> From: Scott Lipcon <slipcon@mercea.net>
> > I'd like to be able to do an ls in a directory of source code while
> > its being built, and basically say: show me all the .c files for which
> > there doesn't exist a .o file.   Right now I'm using:
> > 
> > ls -1 *.[co] | cut -f 1 -d"." | uniq -c | grep 1

>     This made me look in the uguide, and looks like there's a variation
>     of this is (requires EXTENDED_GLOB):
> 
>     % print *.c~f*
> 
>     it works in this form, but isn't usable for the original task.
>     Neither my copy of zsh manual nor user guide mention that this
>     shouldn't work, but it doesn't:
> 
>     roman@freepuppy ~/tmp/foo 1030:0 > ls
>     bar.c   bar.o   baz.c   baz.o   foo.c
>     roman@freepuppy ~/tmp/foo 1031:0 > ls *.c~f*
>     bar.c   baz.c
>     roman@freepuppy ~/tmp/foo 1032:0 > ls *.c~*.o
>     bar.c   baz.c   foo.c
>     roman@freepuppy ~/tmp/foo 1033:0 > 
> 
>     could anyone explain this to me?

The extended glob used excludes those filenames which match the second
glob.  The first one excludes filenames starting with "f".  The second
excludes those ending ".o".

If a filename ends ".c" then it can not also, at the same time, end
".o".

This says nothing about whether or not there exists a different filename
which has the same basename, but ends ".o" instead of ".c".
-- 
Some mornings it's just not worth gnawing through the straps.

[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]

  reply	other threads:[~2002-08-27 17:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-23 13:35 Scott Lipcon
2002-08-23 15:14 ` Phil Pennock
2002-08-23 15:59 ` Bart Schaefer
     [not found]   ` <20020823202218.A13113@globnix.org>
2002-08-24  3:47     ` Bart Schaefer
2002-08-24 21:56       ` Phil Pennock
2002-08-25  5:27         ` Bart Schaefer
2002-08-25 22:47           ` Phil Pennock
2002-08-27 10:34 ` Roman Neuhauser
2002-08-27 17:20   ` Phil Pennock [this message]
2002-08-27 18:00     ` Roman Neuhauser

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=20020827192020.A7905@globnix.org \
    --to=phil.pennock@globnix.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).