Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use bash to create a simple photo inventory system. Your system will store basic information about photos and allow the user to create, read, update,

Use bash to create a simple photo inventory system. Your system will store basic information about photos and allow the user to create, read, update, and delete these photo items. You may not use sed, awk, find, grep, Python, perl, or any other programming language, scripting language, or other tools.image text in transcribed

The user then enters a corresponding one character selection (either upper or lowercase entries should be permissible), leading to one of the following actions: a. C: Create a new photo item i. From the terminal, prompt for the following fields, one at a time, each on its own line: 1. Photo number: such as 23 (must be in the range 1 to 99999). 2. Photo file location: such as /home/bk1740/temp/pic1.jpg. If it does not exist, print an error message and ask again. 3. Photo year: such as 2021 (must in the range 1950 to 2050) 4. Photo month: such as 1 (must be from 1 to 12) 5. Photo day: such as 30 (must be from 1 to 31) 6. Photo location: such as Sydney, Australia (required) 7. Photo names: such as Nicole Kidman, Hugh Jackman (optional) ii. Validate that the photo number is unique before asking for the photo file. If not, print the error "p.photo already exists" and return to the main prompt, where is the photo number above. iii. If the year, month or day is out of range, print an error message like "Month 25 is not in the range 1 to 12" and continue asking for it until it is range. iv. Create the data directory if it does not exist (see below). v. Using the values entered by the user, create a new file in the data subdirectory. vi. Update data/queries.log by adding a CREATED line entry<><>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

b. What are its goals and objectives?

Answered: 1 week ago