1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
|
IID(1) General Commands Manual IID(1)
NAME
iid - interactive query for ID database
SYNOPSIS
iid [-a] [-ccommand] [-H]
DESCRIPTION
This command provides an interactive query interface to the ID database. Iid allows you
to query an ID database in a fashion similar to using DIALOG. Any individual query command
results in a list of files that satisfy that query, each set of files is retained by iid
and assigned a set number. The sets may be combined with AND, OR and NOT operators to pro-
duce additional sets. The primitive operators that produce sets are invocations of the lid
or aid programs.
OPTIONS
Normally iid runs interactively. Options may be used to run it in batch mode.
-a Use the aid program as the default query program, normally lid is used.
-c Accept a single command as an argument, run that command, and exit Iid.
-H Print a brief help message and exit.
SUBCOMMANDS
The subcommands are used to carry on a dialog with iid after invoking the program.
Two basic query commands are available: SS and FILES. The SS command shows the sets gen-
erated by a query, but does not display the actual file names that satisfy the query. The
FILES command only displays the list of files, it does not show any of the sets created
during the query.
Queries consist of keywords and identifier strings. The keywords are: and or not lid aid
match and s<number> where s<number> is a set number consisting of the letter s followed
(with no space) by a decimal set number. A clause of the form lid <identifier list> in-
vokes lid with the <identifier list> as arguments and produces a set of files as a result.
Substituting aid for lid runs the aid program to generate the list of files. As a short-
hand notation for lid <identifier> you may simply use <identifier>. The match operator
runs the standard system ls utility to produce a set of files. This allows sets to be con-
structed based on the names of files (using wild cards) rather than contents. The and or
and not operators can be used to combine sets in the obvious fashion. If you need to pass
any of the keywords as actual arguments to programs, or if the search strings contain any
shell escape characters place the argument in quotes.
The NOT operator has highest precedence, followed by AND and OR in that order. Parenthesis
may be used for grouping.
The remaining commands are:
BEGIN <directory> accepts a directory name and switches to that directory. By changing di-
rectories you control which ID database is searched. Changing directories automatically
deletes all the sets constructed so far. The BEGIN command may be abbreviated as B.
SETS shows the description of all the sets created so far. Each set description has the
set number, the number of files in the set, and a symbolic description of the query that
created the set.
SHOW <set number> runs a pager program, passing as arguments all the files in the speci-
fied set. The pager program comes from the $PAGER environment variable. This command may
be abbreviated P.
HELP runs the pager on the help file. The commands H and ? also act as help commands.
OFF exits the program. Q is short for OFF.
All commands and keywords are case insensitive, so that SHOW ShOW and show all work
equally well.
INTERFACE
Two forms of commands are provided for interface with arbitrary programs. Any command that
is not recognized as one of the above built in iid commands, is assumed to be a program
which, when run, will print a list of file names. Iid runs the command as typed, and
records the output as a new set which may be combined with other sets in subsequent
queries.
If the command starts with a !, iid strips off the leading ! and simply runs the command.
Any output goes to stdout and is not recorded as a set.
In both types of shell commands, any set numbers specified as arguments are expanded into
a list of file names before running the command.
EXAMPLE
===> iid
iid> ss lid "^get" or lid "Arg$"
S0 14 lid -kmn "^get"
S1 3 lid -kmn "Arg$"
S2 15 (lid -kmn "^get") OR (lid -kmn "Arg$")
iid> f s1
lid.c
paths.c
init.c
iid> off
In this example the
ss
command displays the sets it creates as it
does the parts of the query. In this case 3 sets are created, set S0
has 14 files in it, set S1 has 3 files and the union of the two sets,
S2, has 15 files. A description of the query that created any given
set is kept along with the set and displayed when sets are printed.
The
f s1
command lists the three files in set S1.
The
off
command terminates the example session.
HINTS
The shell interface commands can be used to generate file sets by running the find or ls
utilities, or compiles of a selected group of files can be done using the !cc command with
a set number as the argument. !lp can be used to print a selected group of files.
This program interfaces nicely with emacs if you run the server program and specify the
client program as your $PAGER.
SEE ALSO
mkid(1), lid(1), aid(1).
IID(1)
|