Download Example Driver Shell Script

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Example Driver Shell Script
This page shows the interaction with a driver.sh that invokes commands for MyDBQL (my database query
language).
% driver.sh
welcome to MyDBQL
Commands are:
1. new schema - creates a new schema
usage: ns <schema_name> <field1_name> ... <fieldm_name>
2. new database - creates a new database
usage: nd <schema_name> <database_name>
3. insert record - appends a record to a database file
usage: ir <database_name>
4. delete record - removes records from a database where <field_name>
has <field_value>
usage: dr <database_name> <field_name> <field_value>
5. print database - prints a database file as a table sorted by the
specified <field_name>
usage: pd <database_name> [[-n] <field_name>]
6. plot field - plots the values of a field in the specified database
usage: pf <database_name> <field_name>
7. help - prints out this summary of commands
usage: h
8. exit - exits MyDBQL
usage: ex
Please enter command:
ns person name age weight
Creating schema "person" with fields "name age weight".
Schema "person" has been created.
Please enter command:
nd medical
usage: nd <schema_name> <database_name>
Please enter command:
nd person medical
Creating "medical" database using schema "person".
Database "medical" using schema "person" has been created.
Please enter command:
ir medical
Inserting record into "medical" database.
Enter values for name age weight:
Johnson 42 220
Record added to "medical" database.
Please enter command:
e
invalid command: e
Please enter command:
h
Commands are:
1. new schema - creates a new schema
usage: ns <schema_name> <field1_name> ... <fieldm_name>
2. new database - creates a new database
usage: nd <schema_name> <database_name>
3. insert record - appends a record to a database file
usage: ir <database_name>
4. delete record - removes records from a database where <field_name>
has <field_value>
usage: dr <database_name> <field_name> <field_value>
5. print database - prints a database file as a table sorted by the
specified <field_name>
usage: pd <database_name> [[-n] <field_name>]
6. plot field - plots the values of a field in the specified database
usage: pf <database_name> <field_name>
7. help - prints out this summary of commands
usage: h
8. exit - exits MyDBQL
usage: ex
Please enter command:
ex
exiting MyDBQL
%
Related documents