Computing.Net > Forums > Windows XP > shell script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

shell script

Reply to Message Icon

Name: easternsun
Date: October 19, 2009 at 23:38:04 Pacific
OS: Linux
CPU/Ram: 3Gh/2G
Product: Red hat Redhat linux v7.0
Subcategory: General
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Ed in Texas.
Date: October 21, 2009 at 04:21:59 Pacific
Reply:

easternsun, perhaps you'd get more answers in the programming forum?
HTH.
Ed in Texas.


0
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: shell script

need shell scripting example www.computing.net/answers/windows-xp/need-shell-scripting-example/139059.html

Batch script error handling www.computing.net/answers/windows-xp/batch-script-error-handling/162737.html

I need help batch file help www.computing.net/answers/windows-xp/i-need-help-batch-file-help/146467.html