Question: Make a script called Ex 4 - covid 1 9 . bash. In this script, you will use the provided filecovid 1 9 . csv

Make a script called Ex4-covid19.bash. In this script, you will use the provided filecovid19.csv, which contains daily case information on COVID-19 in different countries.The file contains the following fields:1st field: the date of the reported cases2nd field: the day3rd field: the month4th field: the year5th field: number of cases6th field: number of deaths7th field: countries names8th field: the geoId9th field: country Code10th field: population data of 2018
Make one variable called countries and store in it the following line, reporting somecountries' names separated by one space. This line should be stored in only one variablecalled countries.Italy Turkey Zambia Switzerland Israel Mexico Peru IraqThis is a list of the countries we consider in this exercise.Q2. Use one for loop over the specified country names by using variable countries; foreach country, create a file. The repeated task of the for loop is to extract all the lines ofcovid19.csv matching a country name and save those lines into a file, i.e., all the lines ofthe covid19.csv containing Italy should be stored in a file called Italy.csv; all the linescontaining Mexico in a file called Mexico.csv, and so on. Do not hardcode the countries;use only one for loop. Do not use if statements.
Use one for loop over the values of the specified country names by using variablecountries, and for each country name, use a pipeline of commands to find the maximumnumber of cases (5th field) and print the country name (7 th field), the date (1 st field) andmaximum number of cases (5th field). You can use the files generated in the previousquestion (in this case, do not hardcode the files) or use covid19.csv.Format the output to obtain:Italy 3/22/206557Turkey 3/31/202318Zambia 3/29/2012Switzerland 3/28/201390Israel 4/2/20675Mexico 4/2/20163Peru 4/2/20258Iraq 3/31/2083Set the width to align the fields. As reported above, the number of spaces between fieldscan vary, but the fields should be aligned.Do not hardcode the country's names; use only one for a loop. Do not use if statements.Format the date as a string. Code in Unix bash

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 Programming Questions!