This project is a Bash script that implements a simple address book management system. It allows you to view, search, insert, and delete entries in a CSV file.
-
View (
view) Displays all entries in the address book sorted by email in a tabular format. -
Search (
search <string>) Searches for a string in all fields of the address book and prints matching entries. If no results are found, it prints "Not found." -
Insert (
insert) Allows adding a new entry to the address book. If the provided email already exists, the script does not insert the entry and prints an error message. -
Delete (
delete <mail>) Deletes the entry associated with the provided email. If the email is not found, it prints "Cannot find any record."
Make the script executable:
chmod +x address-book.sh
-
View (
view)
Displays all entries in the address book sorted by email in a tabular format. If the file does not exist, it prints an error message. -
Search (
search <string>)
Searches for a string in all fields of the address book and prints matching entries. If no results are found, it prints "Not found." The search is case-insensitive. -
Insert (
insert)
Allows adding a new entry to the address book. The script prompts the user to input the following fields:- Name
- Surname
- Phone
- City
- Address
If the provided email already exists in the address book, the script does not insert the entry and prints an error message.
-
Delete (
delete <mail>)
Deletes the entry associated with the provided email. If the email is found, the corresponding entry is removed while keeping the header intact. If the email is not found, it prints "Cannot find any record."
This project is intended for educational purposes only and is not meant for commercial use.
- Name: [Filippo Spazzali]
- School: [Università degli Studi di Trieste]
- Course: [Computer Science]