Next: Command and function Up: The command mode Previous: The command mode

General principles

The historically first query mode developed is the command mode. Commands are issued at the Unix shell prompt and the user can benefit of the shell facilities, including command history, command editing and pipe or output redirection. Unix-style commands with several options have been written. These options provide most methods needed to extract information from the database, compare data and plot diagrams. For sake of simplicity, the commands that work on a specific datatype have the same name as the datatype designation. For example the command ubv deals with the UBV pe data and the mk command, with the MK spectral types. Command names are listed in Appendix A and option meanings, in Appendix B. The file names and content are described in Appendix D, while the various fields of each data file are described in Appendix E.

The file organisation and their small size (a few hundred records), make the consultation very rapid with UNIX tools: the grep family and awk. The programming of the Bourne shell, together with specific Fortran or C language codes, offers interesting possibilities for coding elegant and efficient functions and commands.

Commands working on data are organised in the same way:

Commands relating to general information (manual, references, bibliography, help, statistics, and so on) can be called from anywhere in the database. However, most commands relating to data retrieval are active in a cluster directory only. Consequently, one first has to place oneself in a cluster directory, which is simply reached by giving its path: ngc 2287. Owing to the fact that the file names are conserved from cluster to cluster there is no need to tell a command which file it applies to: it knows it automatically. Because there is no a priori necessity to display a part of a record only instead of the whole line, it is not useful to know the detailed structure of the record for each datatype. A simple function called nof for "name of file" is used to get the corresponding filename. Try nof ubv just to see.



Next: Command and function Up: The command mode Previous: The command mode


mermio@
Thu Sep 1 17:27:31 MET DST 1994