Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I try to do this question, please can u tell me the answer to be sure of my answer
(
A shell script should be named insert_record.sh and its purpose is to insert a record into a database.
It accepts one argument, which is the DATABASE_NAME. The insert_record.sh script should then prompt the user for the values of the fields in that database.
After that the script should read in the field values and append these values in a new line to the end of the DATABASE_NAME.db file. Finally, the script should print a message that the new database record has been added.
For instance, below is an example session of using the insert_record.sh script.
( the green field values would be entered by the user.)
$ ./insert_record.sh svu
ENTER VALUES FOR name age weight: [COLOR="SeaGreen"]Ahmad 42 75[/COLOR]
RECORD ADDED TO " svu" DATABASE.
If the DATABASE_NAME does not exist in the databases.txt file or the DATABASE_NAME.db does not exist, then you should print an appropriate error message and exit.
)
Thank you

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |