This assignment will give you practise w/user and program interfaces, and choosing/building useful data structures.
You will maintain a flat-file database, allowing users to query, delete a entry, create an entry.
You'll also, for some practise, submit a make file.
Write a command-line utility called cddb to maintain a flat-file database of album information. You will allow the user to view album info, add a new entry, or delete an entry, where each entry is an album w/all of the track information, as follows:
Options, and Descriptions
You may assume that all names are entered exactly. That is, do not worry about inconsistencies in spelling or capitalisation. E.g., Led Zeppelin, LedZeppelin, and led zeppelin are 3 different groups for this assignment.
If no argument is supplied, a bad argument is supplied, or multiple arguments, print a usage message and exit.
File Format
Album information will be stored in a flat file w/the format shown in sample.db:
Led Zeppelin
1979 In Through the Outdoor
-In the Evening
-South Bound Saurez
-Fool in the Rain
-Hot Dog
-Carouselambra
-All My Love
-I'm Gonna Crawl
Led Zeppelin
1969 II
-Whole Lotta Love
-What Is and What Should Never Be
-The Lemon Song
-Thank You
-Heartbreaker
-Living Loving Maid (She's Just a Woman)
-Ramble On
-Moby Dick
-Bring It on Home
Bob Dylan
1966 Blonde on Blonde
-Rainy Day Women #12 & 35
-Pledging My Time
-Visions of Johanna
-One of Us Must Know (Sooner or Later)
-I Want You
-Stuck Inside of Mobile with the Memphis Blues Again
-Leopard-Skin Pill-Box Hat
-Just Like a Woman
-Most Likely You Go Your Way (And I'll Go Mine)
-Temporary Like Achilles
-Absolutely Sweet Marie
-4th Time Around
-Obviously 5 Believers
-Sad Eyed Lady of the Lowlands
To simplify things, the filename (location of the DB) will be stored in an exported environment variable, $CDDB .