Linux Shell Scripting Projects For Beginners
Address database

Home Embedded Systems Linux Systems Ls Projects Linux Systems Project | Address Database

Linux Shell Scripting Projects for Beginners โ€“ Address Database

About this project

Address Database tool one of the BASH shell based Linux Shell Scripting Projects that is providing various operations to handle a particular database.

Share via :

About this project

TYPE Individual project
DIFFICULTY Advanced
ESTIMATED TIME 50 hours
PUBLISHED 15th March, 2021
CONTACT training@emertxe.com

Introduction

Address Database is one of the BASH shell based Linux Shell Scripting Projects that is providing various operations to handle a particular database. Initially the data-base need to be pre-populated with some data for which the user will be provided with a set of commands (ex: add / modify / delete / search) using which he should be able to modify them. Practically database operations are performed in web applications whenever they are dealing with data. Popularly known as CRUD (Create / Read / Write / Delete) operations, they mainly help to deal with the backend database.  

The idea of this project is to implement an address book database management system using BASH Shell scripting and a local text based database. Along with this user functionality, this tool should record all the actions performed along with time-stamps for future references. Since the idea of this tool is to exposure SHELL programming, CSV file is used as a data-base storing entity. By implementing this project you will get a basic understanding of data-base operations, timeout handling, command parsing using various shell commands. By building this Linux Shell Scripting Projects you will be able to get a real feel of Automation and Application Development in Linux. 

Requirement Details

Following are the requirements for this Linux Shell Scripting Project. They are categorized into various functional areas. 

  • Activity log file:
      • Every activity while the script is to be logged in file named database .log.
      • Attach timestamp to every entry.
  • Working environment settings:
      • Should create a directory called โ€œDatabaseโ€ in userโ€™s home directory structure tree, ECEP/LinuxSystems/Projects directory if it doesnโ€™t exist.
      • Create a file named โ€œdatabase.csvโ€ under Database directory if it doesnโ€™t exist.
      • Check the existence of at least one valid data entry in database.csv.
      • If the file is empty, script should only prompt for data addition unless and until it gets a valid entry to display.
  • User interface:
    • The script should have the following functionalities as listed below
  1. Add Entry
  2. Search / Edit Entry
  • Add Entry:

When the user selects the โ€œAdd Entryโ€ option it should have the following fields to be added

  • Name
  1. Accept the user entry in any case but convert it to sentence case while storing.
  2. Accept only alphabets and spaces
  • E-mail
  1. Accept only symbols like โ€œ.โ€, โ€œ_โ€, alphabets, and numbers. Validate for โ€œ@โ€ and a โ€œ.โ€ after it
  • Telephone Number
  1. Accept only numbers
  • Mobile Number
  1. Add country code (assume Indian customers)
  2. Validate for 10 digit entry
  3. Accept only numbers
  • Place
  1. Accept the user entry in any case but convert it to sentence case while storing
  2. Accept only alphabets and spaces
  • Message
  1. Any character allowed
  2. No formatting has to be done, user entry has to be captured as is.
  3. Proper formatted output

When the user finishes all the above fields the information has to be stored with current โ€œdateโ€ and โ€œtimeโ€ automatically

  • Time-out:

The script should time out if the user input is absent for more than 10 seconds.

Skeleton Code

The skeleton code in a very interesting concept used in Emertxe. By looking into the skeleton code, you will get a clear picture into converting the given requirement into a working solution. This will also take care of important aspects like modularity, clean coding practices, re-usability etc, while building a real-time Linux Shell Scripting Project.

 

Sample Output

Here are the sample output expected by the end of project execution.

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 1
Fig1: Main Menu. Proceeding towards Add Entry

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 2
Fig2: Add Entry Screen

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 3
Fig3: Adding a new Contact with help of Name

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 4
Fig4: View of added contact. Proceeding to add Mobile Number

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 5
 Fig5: Adding Mobile Number

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 6
Fig6: Updated contact view. Proceeding to previous screen

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 7
Fig7: Main Menu. Proceeding towards Search / Edit Entry

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 8
Fig8: Search Menu. Observe the color highlight, The Edit Menu would be similar once the item is searched

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 9
Fig9: Search Menu. Proceeding towards Search by Name

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 10
Fig10: The name to be Searched

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 11
Fig11: Search Result. Observe the color highlight, its in Edit Menu now, Proceeding to add Place field

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 12Fig12: Adding Place
 
Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 13
Fig13: Updated screen with Place. Proceeding to Save

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 14
Fig14: Proceeding to Exit Search / Edit Screen

 

Linux Shell Scripting Projects for Beginners | Address Database | Project Output - 15
Fig15: Back to Main Screen. Proceeding to Exit Script

 

Fig16: The contact database in .csv file format

 

Fig17: Assuming multiple entries with same n, This is how the Search result should be shown

 

Fig18: Selection of 2nd user to Edit
Requirement Details
  • Activity log file:
  • Working environment settings:
  • User interface:
  • Add Entry:
  • Time-out:
Sample Output
  • Fig1: Main Menu. Proceeding towards Add Entry
  • Fig2: Add Entry Screen
  • Fig3: Adding a new Contact with help of Name
  • Fig4: View of added contact. Proceeding to add Mobile Number
  •  Fig5: Adding Mobile Number
  • Fig6: Updated contact view. Proceeding to previous screen
  • Fig7: Main Menu. Proceeding towards Search / Edit Entry
  • Fig8: Search Menu. Observe the color highlight, The Edit Menu would be similar once the item is searched
  • Fig9: Search Menu. Proceeding towards Search by Name
  • Fig10: The name to be Searched
  • Fig11: Search Result. Observe the color highlight, its in Edit Menu now, Proceeding to add Place field
  • Fig13: Updated screen with Place. Proceeding to Save
  • Fig14: Proceeding to Exit Search / Edit Screen
  • Fig15: Back to Main Screen. Proceeding to Exit Script
  • Fig16: The contact database in .csv file format
  • Fig17: Assuming multiple entries with same n, This is how the Search result should be shown
  • Fig18: Selection of 2nd user to Edit
Requirement Details
  • Activity log file:
  • Working environment settings:
  • User interface:
  • Add Entry:
  • Time-out:
Sample Output
  • Fig1: Main Menu. Proceeding towards Add Entry
  • Fig2: Add Entry Screen
  • Fig3: Adding a new Contact with help of Name
  • Fig4: View of added contact. Proceeding to add Mobile Number
  •  Fig5: Adding Mobile Number
  • Fig6: Updated contact view. Proceeding to previous screen
  • Fig7: Main Menu. Proceeding towards Search / Edit Entry
  • Fig8: Search Menu. Observe the color highlight, The Edit Menu would be similar once the item is searched
  • Fig9: Search Menu. Proceeding towards Search by Name
  • Fig10: The name to be Searched
  • Fig11: Search Result. Observe the color highlight, its in Edit Menu now, Proceeding to add Place field
  • Fig13: Updated screen with Place. Proceeding to Save
  • Fig14: Proceeding to Exit Search / Edit Screen
  • Fig15: Back to Main Screen. Proceeding to Exit Script
  • Fig16: The contact database in .csv file format
  • Fig17: Assuming multiple entries with same n, This is how the Search result should be shown
  • Fig18: Selection of 2nd user to Edit

similar projects

  • All
  • Foundation
  • Speciality
  • Upskilling