home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume24 / mkid2 / part02 / iid.help < prev    next >
Text File  |  1991-10-09  |  3KB  |  93 lines

  1. The iid program is an interactive shell on  top of the  mkid, lid, aid
  2. database programs. It allows interactive queries of  an ID database in
  3. a fashion similar to a DIALOG session. Iid remembers the sets of files
  4. that were reported by any  lid or aid request.  These sets are refered
  5. to by set numbers. The commands available are:
  6.  
  7. BEGIN <directory>    cd to directory (presumably containing an ID file).
  8. B                    short for BEGIN
  9. SS <query>           run query displaying the sets generated
  10. FILES <query>        run query listing the files in the final set
  11. F                    short for FILES
  12. SHOW <set number>    run pager program on files in set
  13. P                    short for SHOW
  14. SETS                 show currently defined sets
  15. HELP                 run pager on this file
  16. ? or H               short commands for HELP
  17. OFF                  exit iid
  18. <cmd>                run a shell command as a file name query
  19. !<cmd>               run a shell command
  20.  
  21. A <set number> is the letter 's' (or 'S')  followed (with no space) by
  22. a number. Set numbers may be used as terms in a query.
  23.  
  24. A <query> is:
  25.    <set number>
  26.    <identifier>
  27.    lid <identifier list>
  28.    aid <identifier list>
  29.    match <wild card list>
  30.    <query> or <query>
  31.    <query> and <query>
  32.  
  33. The words  "lid", "aid", "match",  "or", and "and" are keywords, along
  34. with any word that looks like a set number. If you  have to use one of
  35. these (or in arguments to lid, aid  or match, shell escape characters)
  36. then quote the name.
  37.  
  38. The  "match" operator constructs a set  of  files by running the "pid"
  39. program with the wild card  pattern as  an argument. This  is the only
  40. operator    which constructs sets   based  on file  names rather  than
  41. contents.
  42.  
  43. An identifier by itself is  simply shorthand for "lid identifier". (If
  44. the -a  option was used  to invoke iid,  then  a simple  identifier is
  45. shorthand for "aid identifier").
  46.  
  47. Example run:
  48.  
  49. ===> iid
  50. ===> ss lid "^get" or lid "Arg$"
  51.    S0     14  lid -kmn "^get"
  52.    S1      3  lid -kmn "Arg$"
  53.    S2     15  (lid -kmn "^get") OR (lid -kmn "Arg$")
  54. ===> f s1
  55. lid.c
  56. paths.c
  57. init.c
  58. ===> ls *.c
  59.    S3     28  ls *.c
  60. ===> ls s*
  61.    S4      9  ls s*
  62. ===> ss s3 and s4
  63.    S5      4  (ls *.c) AND (ls s*)
  64. ===> !grep vhil s5
  65. scan-c.c:                setCArgs("vhil",'+',"v");
  66. scan-c.c:            setCArgs("vhil",'+',"v");
  67. ===> off
  68.  
  69. In  this example  the 'ss' command  displays  the sets it creats as it
  70. does the parts of the  query. In this case  3 sets are created, set S0
  71. has 14 files in it, set S1 has 3 files and the  union of the two sets,
  72. S2, has 15 files.  A description of the  query that created any  given
  73. set is kept along with the set and displayed when sets are printed.
  74.  
  75. The 'f s1' command says list the files in set S1, and  the three files
  76. in the set are displayed.
  77.  
  78. The 'ls'  commands are examples of using  arbitrary  shell commands to
  79. generate lists  of files. In  this case the  'ls' command. (This could
  80. have been done as part of another query using the 'match' operator).
  81.  
  82. The '!grep vhil s5' command runs  the 'grep'  shell command passing as
  83. arguments 'vhil' and the names of all the files in s5.
  84.  
  85. The 'off' command terminated the example session.
  86.  
  87. Keywords, commands, and set numbers are recognized  regardless of case
  88. (and is And is aNd). Other parameters are case sensitive.
  89.  
  90. The iid program can  also be run in a  batch mode using the -c option.
  91. For more information on command line options, run "iid -H", or use the
  92. Unix 'man' command.
  93.