Code Monkey home page Code Monkey logo

contact-book's Introduction

contact-book

A shell script to manage your personal contact book which will keep record of your contact details. Follow the below instructions to write the shell script.

  • Input: contacts.csv is the input file with fields fname (FirstName), lname (LastName), mobile (Mobile Number), Office (CompanyName).
  • This contacts.csv will be updated after every insert, delete and edit. No command other than display all, or search and display should print anything on the terminal.
  • No command other than display all, or search and display should print anything on the terminal.
  • The output for ‘search and display’ and ‘display all’ should be coma separated words in the same sequence as the format of the csv.
  • The commands should be as follows
    • Insert Contact
    • Edit Contact
    • Display all Contacts
    • Search and Display
    • Delete Contact

The system should run based on flag-based command line arguments. A flag –C would be used to first specify the command (which would be one of ‘insert’, ‘edit’, ’display’, ‘search’, ‘delete’) The flags for each command are as follows:

Insert

o -f for entering first name
o -l for entering last name
o -n for entering contact number
o -o for entering company name

Edit contact

o -k give the first name of the contact to be edited (assume no 2 contacts
have same first name)
o -f for entering updated first name
o -l for entering updated last name
o -n for entering updated contact number
o -o for entering updated company name

Display all contacts

o -a to sort in ascending order of first name
o -d to sort in descending order of first name

Search and display

o -c for entering the column on which it is to be searched (has to be one of
first name, last name or number)
o -v for the search value of that column

Delete contact

o -c for entering the column on which it is to be searched (has to be one of
first name, last name or number)
o -v for the search value of that column of the record to be deleted

contact-book's People

Contributors

karthikprasanna avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.