zsh-users
 help / color / mirror / code / Atom feed
From: Phil Pennock <Phil.Pennock@globnix.org>
To: Scott Lipcon <slipcon@mercea.net>
Cc: zsh-users@sunsite.dk
Subject: Re: how to?
Date: Fri, 23 Aug 2002 17:14:12 +0200	[thread overview]
Message-ID: <20020823171412.A438@globnix.org> (raw)
In-Reply-To: <20020823133510.2B8EC5B5@mercea.net>; from slipcon@mercea.net on Fri, Aug 23, 2002 at 09:35:10AM -0400

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

On 2002-08-23 at 09:35 -0400, Scott Lipcon wrote:
> Here's something I figure is possible in zsh, but I don't know how -
> 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
> 
> but there has to be a zsh way to do that without 3 pipes.  Any ideas?

print -l -- *.c(e:[[ ! -f '${REPLY%.c}.o' ]]:)

See zshexpn(1) and "Glob Qualifiers" therein.
-- 
Whatever kind of look you were going for, you missed.

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

  reply	other threads:[~2002-08-23 15:14 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 [this message]
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
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=20020823171412.A438@globnix.org \
    --to=phil.pennock@globnix.org \
    --cc=slipcon@mercea.net \
    --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).