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 Excovidbash. In this script, you will use the provided filecovidcsv which contains daily case information on COVID in different countries.The file contains the following fields:st field: the date of the reported casesnd field: the dayrd field: the monthth field: the yearth field: number of casesth field: number of deathsth field: countries namesth field: the geoIdth field: country Codeth field: population data of
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.Q 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 ofcovidcsv matching a country name and save those lines into a file, ie all the lines ofthe covidcsv 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 th field and print the country name th field the date st field andmaximum number of cases th field You can use the files generated in the previousquestion in this case, do not hardcode the files or use covidcsvFormat the output to obtain:Italy Turkey Zambia Switzerland Israel Mexico Peru Iraq Set 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
