FSET(1) Icon Program Library FSET(1) NNNNAAAAMMMMEEEE fset - perform set operations on UNIX file specifications SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ffffsssseeeetttt argument DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN The UNIX shell provides for the specification of filenames using ``wildcards''. Each wildcard specification may be thought of as defining a set of names (that is, those that match the specification). _F_s_e_t allows the user to apply the set operations of intersection, union, and difference to these filename sets. The resultant list may then be used as an argument to other shell commands. _F_s_e_t's argument is an expression composed of legal UNIX file specifications, parenthesis, and the following set opera- tors: && intersection ++++++++ union -------- difference Because characters that have special meaning to the shell occur frequently in the arguments used for _f_s_e_t, it is advisable to quote the arguments consistently. The use of _f_s_e_t is illustrated by the following examples: fset 'g*--*.icn' produces the list (set) of filenames for files beginning with gggg, excluding those ending with ....iiiiccccnnnn. Similarly, fset '*' produces all files in the current directory excluding the .... and ........ files. fset '((*--*.icn)++c*)' and fset '(*--*.icn)++c*' produces the complement of all filenames ending with ....iiiiccccnnnn in addition to all filenames beginning with cccc. fset '(((c? && c*)))' Version 5.9 The University of Arizona - 8/15/84 1 FSET(1) Icon Program Library FSET(1) is a redundant, but legal, specification for all two- character filenames that begin with cccc, while fset '.*' produces the set of filenames for all hidden files, exclud- ing the .... and ........ files. RRRREEEEQQQQUUUUIIIIRRRREEEEMMMMEEEENNNNTTTTSSSS _F_s_e_t requires the sets extension to Icon. _G_s_e_t performs the same functions as _F_s_e_t(_1), but does not require the sets extension. LLLLIIIIMMMMIIIITTTTAAAATTTTIIIIOOOONNNNSSSS Multiple command line arguments, formed by omitting the quotes around the file set expression, are permitted. Their use is limited, however, since parentheses do not get past the shell's command-line expansion. Almost any legal file specification will work when enclosed in quotes except that the simple grammar that is used cannot handle blanks adjacent to parentheses. File names that begin or end in ``questionable'' characters such as ****, ????, ++++, ----, and &&&&, probably will not work. A file specification that, when interpreted by the shell, produces no matching filename will be placed (unchanged) in the result. SSSSEEEEEEEE AAAALLLLSSSSOOOO gcomp(1), gset(1) Griswold, Ralph E., Robert K. McConeghy, and William H. 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 _L_a_n_g_u_a_g_e, TR 84-10a, Department of Computer Science, The University of Arizona, 1984. AAAAUUUUTTTTHHHHOOOORRRR Thomas R. Hicks Version 5.9 The University of Arizona - 8/15/84 2