From rsalz@bbn.com Wed Feb 24 04:01:02 1988
Path: megaron!arizona!noao!hao!gatech!bbn!bbn.com!rsalz
From: rsalz@bbn.com (Rich Salz)
Newsgroups: comp.sources.unix
Subject: v13i068:  Perform "set" operations on command line arguments
Message-ID: <446@fig.bbn.com>
Date: 24 Feb 88 11:01:02 GMT
Organization: BBN Laboratories Inc., Cambridge MA
Lines: 387
Approved: rsalz@uunet.UU.NET

Submitted-by: Chris Tweed <mcvax!caad.ed.ac.uk!chris@UUNET.UU.NET>
Posting-number: Volume 13, Issue 68
Archive-name: sets

I am sending you a program called 'sets' which you may wish to consider
for comp.unix.sources.  Sets performs union, intersection, and difference
operations on elements of two sets given on the command line.  I have
found it most useful for limiting the set of filenames I want another
command to work on.

For example, if I want to edit every file except those ending in '.c' I
could type:
	vi `sets * -d *.c`
which prints out the difference between the set of all files in the
current directory and the set of all '.c' files in the same directory.

Another example is to list the files in one directory which have the same
names as those in another directory, i.e. the intersection of the two
sets:
	sets * -i ../*

Hope it's useful.
    Chris Tweed
    chris@caad.ed.ac.uk
    ..!mcvax!ukc!edcaad!chris

