|
|
1.1 root 1:
2:
3:
4: FSET(1) Icon Program Library FSET(1)
5:
6:
7:
8: NNNNAAAAMMMMEEEE
9: fset - perform set operations on UNIX file specifications
10:
11: SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
12: ffffsssseeeetttt argument
13:
14: DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
15: The UNIX shell provides for the specification of filenames
16: using ``wildcards''. Each wildcard specification may be
17: thought of as defining a set of names (that is, those that
18: match the specification). _F_s_e_t allows the user to apply the
19: set operations of intersection, union, and difference to
20: these filename sets. The resultant list may then be used as
21: an argument to other shell commands.
22:
23: _F_s_e_t's argument is an expression composed of legal UNIX file
24: specifications, parenthesis, and the following set opera-
25: tors:
26:
27: && intersection
28: ++++++++ union
29: -------- difference
30:
31: Because characters that have special meaning to the shell
32: occur frequently in the arguments used for _f_s_e_t, it is
33: advisable to quote the arguments consistently.
34:
35: The use of _f_s_e_t is illustrated by the following examples:
36:
37: fset 'g*--*.icn'
38:
39: produces the list (set) of filenames for files beginning
40: with gggg, excluding those ending with ....iiiiccccnnnn.
41:
42: Similarly,
43:
44: fset '*'
45:
46: produces all files in the current directory excluding the ....
47: and ........ files.
48:
49: fset '((*--*.icn)++c*)'
50:
51: and
52:
53: fset '(*--*.icn)++c*'
54:
55: produces the complement of all filenames ending with ....iiiiccccnnnn in
56: addition to all filenames beginning with cccc.
57:
58: fset '(((c? && c*)))'
59:
60:
61:
62:
63: Version 5.9 The University of Arizona - 8/15/84 1
64:
65:
66:
67:
68:
69:
70: FSET(1) Icon Program Library FSET(1)
71:
72:
73:
74: is a redundant, but legal, specification for all two-
75: character filenames that begin with cccc, while
76:
77: fset '.*'
78:
79: produces the set of filenames for all hidden files, exclud-
80: ing the .... and ........ files.
81:
82: RRRREEEEQQQQUUUUIIIIRRRREEEEMMMMEEEENNNNTTTTSSSS
83: _F_s_e_t requires the sets extension to Icon. _G_s_e_t performs the
84: same functions as _F_s_e_t(_1), but does not require the sets
85: extension.
86:
87: LLLLIIIIMMMMIIIITTTTAAAATTTTIIIIOOOONNNNSSSS
88: Multiple command line arguments, formed by omitting the
89: quotes around the file set expression, are permitted. Their
90: use is limited, however, since parentheses do not get past
91: the shell's command-line expansion.
92:
93: Almost any legal file specification will work when enclosed
94: in quotes except that the simple grammar that is used cannot
95: handle blanks adjacent to parentheses.
96:
97: File names that begin or end in ``questionable'' characters
98: such as ****, ????, ++++, ----, and &&&&, probably will not work.
99:
100: A file specification that, when interpreted by the shell,
101: produces no matching filename will be placed (unchanged) in
102: the result.
103:
104: SSSSEEEEEEEE AAAALLLLSSSSOOOO
105: gcomp(1), gset(1)
106:
107: Griswold, Ralph E., Robert K. McConeghy, and William H.
108: Mitchell. _E_x_t_e_n_s_i_o_n_s _t_o _V_e_r_s_i_o_n _5 _o_f _t_h_e _I_c_o_n _P_r_o_g_r_a_m_m_i_n_g
109: _L_a_n_g_u_a_g_e, TR 84-10a, Department of Computer Science, The
110: University of Arizona, 1984.
111:
112: AAAAUUUUTTTTHHHHOOOORRRR
113: Thomas R. Hicks
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129: Version 5.9 The University of Arizona - 8/15/84 2
130:
131:
132:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.