1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2009
    Rep Power

    How to wite this shell script

    Hi all
    I want u to help answer this question
    ( A shell script should be named new_database.sh and its purpose is to create a new database. It accepts two arguments, the first is SCHEMA_NAME and the second is a DATABASE_NAME. For instance, below is an example invocation of the new_database.sh script and response.
    $ .new_database.sh persons tutors
    The name of the database and the schema it uses should be appended to the databases.txt file.
    Below is an example databases.txt file:
    tutors persons
    student persons
    nina_12345_grades grades
    intel company
    If either the SCHEMA_NAME does not exist or the DATABASE_NAME already exists, then you the command prints an appropriate error message and exit. If the SCHEMA_NAME exists and the DATABASE_NAME is not already used, then the script should append the information to the end of the databases.txt file, create a new empty database file of the form DATABASE_NAME.db, and print a message that the database has been created.

    thank you.
  2. #2
  3. No Profile Picture
    Needs a pillow.... :)
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2006
    Rep Power
    How much are you going to pay for us to do your assignment?

    What college or school do you go to?
    A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. - Douglas Adams

IMN logo majestic logo threadwatch logo seochat tools logo