Go to the first, previous, next, last section, table of contents.

Iid

Command: iid [-a] [-c<command>] [-H]
-a
Normally iid uses the lid command to search for names. If you give the -a option on the command line, then it will use aid as the default search engine.
-c<command>
In normal operation, iid starts up and prompts you for commands used to build sets of files. The -c option is used to pass a single query command to iid which it then executes and exits.
-H
The -H option prints a short help message and exits. To get more help use the help command from inside iid.

The iid program is an interactive ID query tool. It operates by running the other query programs (such as lid and aid) and creating sets of file names returned by these queries. It also provides operators for anding and oring these sets to create new sets.

The PAGER environment variable names the program iid uses to display files. If you use emacs, you might want to set PAGER so it invokes the emacsclient program. Check the file `lisp/server.el' in the emacs source tree for documentation on this. It is useful not only with X windows, but also when running iid from an emacs shell buffer. There is also a somewhat spiffier version called gnuserv by Andy Norman (ange%anorman@hplabs.hp.com) which appeared in `comp.emacs' sometime in 1989.

Ss and Files commands

The primary query commands are ss (for select sets) and files (for show file names). These commands both take a query expression as an argument.

Subcommand: ss query
The ss command runs a query and builds a set (or sets) of file names. The result is printed as a summary of the sets constructed showing how many file names are in each set.

Subcommand: files query
The files command is like the ss command, but rather than printing a summary, it displays the full list of matching file names.

Subcommand: f query
The f command is merely a shorthand notation for files.

Database queries are simple expressions with operators like and and or. Parentheses can be used to group operations. The complete set of operators is summarized below:

pattern
Any pattern not recognized as one of the keywords in this table is treated as an identifier to be searched for in the database. It is passed as an argument to the default search program (normally lid, but aid is used if the -a option was given when iid was started). The result of this operation is a set of file names, and it is assigned a unique set number.
lid
lid is a keyword. It is used to invoke lid with the list of identifiers following it as arguments. This forces the use of lid regardless of the state of the -a option (see section Lid).
aid
The aid keyword is like the lid keyword, but it forces the use of the aid program (see section Aid).
match
The match operator invokes the pid program to do pattern matching on file names rather than identifiers. The set generated contains the file names that match the specified patterns (see section Pid).
or
The or operator takes two sets of file names as arguments and generates a new set containing all the files from both sets.
and
The and operator takes two sets of file names and generates a new set containing only files from both sets.
not
The not operator inverts a set of file names, producing the set of all files not in the input set.
set number
A set number consists of the letter s followed immediately by a number. This refers to one of the sets created by a previous query operation. During one iid session, each query generates a unique set number, so any previously generated set may be used as part of any new query by referring to the set number.

The not operator has the highest precedence with and coming in the middle and or having the lowest precedence. The operator names are recognized using case insensitive matching, so AND, and, and aNd are all the same as far as iid is concerned. If you wish to use a keyword as an operand to one of the query programs, you must enclose it in quotes. Any patterns containing shell special characters must also be properly quoted or escaped, since the query commands are run by invoking them with the shell.

Summary of query expression syntax:

A <query> is:
   <set number>
   <identifier>
   lid <identifier list>
   aid <identifier list>
   match <wild card list>
   <query> or <query>
   <query> and <query>
   not <query>
   ( <query> )

Sets

Subcommand: sets

The sets command displays all the sets created so far. Each one is described by the query command that generated it.

Show

Subcommand: show set

Subcommand: p set

The show and p commands are equivalent. They both accept a set number as an argument and run the program given in the PAGER environment variable with the file names in that set as arguments.

Begin

Subcommand: begin directory

Subcommand: b directory

The begin command (and its abbreviated version b) is used to begin a new iid session in a different directory (which presumably contains a different database). It flushes all the sets created so far and switches to the specified directory. It is equivalent to exiting iid, changing directories in the shell, and running iid again.

Help

Subcommand: help

Subcommand: h

Subcommand: ?

The help, h, and ? command are three different ways to ask for help. They all invoke the PAGER program to display a short help file.

Off

Subcommand: off

Subcommand: quit

Subcommand: q

These three command (or just an end of file) all cause iid to exit.

Shell Commands as Queries

When the first word on an iid command is not recognized as a builtin iid command, iid assumes the command is a shell command which will write a list of file names to stdout. This list of file names is used to generate a new set of files.

Any set numbers that appear as arguments to this command are expanded into lists of file names prior to running the command.

Shell Escape

If a command starts with a bang (!) character, the remainder of the line is run as a shell command. Any set numbers that appear as arguments to this command are expanded into lists of file names prior to running the command.


Go to the first, previous, next, last section, table of contents.