Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: how to?



> From: Scott Lipcon <slipcon@xxxxxxxxxx>
> To: zsh-users@xxxxxxxxxx
> Subject: how to?
> Date: Fri, 23 Aug 2002 09:35:10 -0400
> 
> 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?

    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?

-- 
FreeBSD 4.6-STABLE
12:19PM up 6 days, 18:12, 19 users, load averages: 0.04, 0.07, 0.02



Messages sorted by: Reverse Date, Date, Thread, Author