home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d145
/
csh.lha
/
Csh
/
sets
/
sets.1
< prev
next >
Wrap
Text File
|
1988-05-26
|
2KB
|
131 lines
SETS(L) Local UNIX Programmer's Manual SETS(L)
NAME
sets - performs set operations on its arguments
SYNOPSIS
sets [-p] e1 e2 ... en [-u] [-d] [-i] e1 e2 ... en
DESCRIPTION
_S_e_t_s prints on the standard output stream the result of a
single set operation on two sets of elements provided on the
command line. The sets are separated by the operator flag.
The program collects the elements for each set, removes
duplicated elements, and then performs the set operation.
_S_e_t_s performs three set operations:
e1 e2 ... en -u[nion] e1 e2 ... en
prints the union of the two sets;
e1 e2 ... en -d[ifference] e1 e2 ... en
prints the set difference _e_1 _e_2 ... _e_n - _e_1 _e_2 ... _e_n;
e1 e2 ... en -i[ntersection] e1 e2 ... en
prints the intersection of the two sets.
As _s_e_t_s is intended to be used on filenames it ignores lead-
ing pathnames in the set operations. The -p flag makes
pathnames significant in membership tests.
USAGE
_S_e_t_s is most useful for restricting the files to be pro-
cessed by some other command. For example, to _g_r_e_p all
files in a directory except the object files you might use:
grep string `sets * -d *.o`
Since by default leading pathnames are ignored, _s_e_t_s can be
used across directories - for example, to list files with
the same names in two directories:
sets ../* -i *
Note that full pathnames are included in the output. As a
result the relative position of the sets on the command line
is significant. The above command will print all matching
names with a leading "../". If the position of the sets is
reversed only the filenames will be printed.
FILES
/usr/local/sets
/usr/src/local/sets.c
Printed 3/2/88 December 3, 1987 1
SETS(L) Local UNIX Programmer's Manual SETS(L)
AUTHOR
Chris Tweed
Printed 3/2/88 December 3, 1987 2