Question: Write a bash script. Consider a file that contains records. Each record consists of the following fields separated by a tab product name: Any sequence

Write a bash script.

Consider a file that contains records. Each record consists of the following fields separated by a tab

product name: Any sequence of letters and spaces

Product ID: A sequence of alphanumeric symbols with no white spaces.

Inventory: An integer that shows the inventory for that product

Last week orders: The number of units ordered last week (integer)

The name of the file is B.txt. The program checks the file for products that we should order soon.

If the inventory is less than what was ordered last week, display Urgently order Product ID

If the inventory is less than double what was ordered last week, we should display We should order Product ID soon (where product ID is the product ID for that product)

Otherwise, do not display anything

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!