Question: Create a file with sed commands named script.sed that edits csv file example-bball.csv Modify the file so that the teams listed in the matchup are

Create a file with sed commands named script.sed that edits csv file example-bball.csv

  1. Modify the file so that the teams listed in the matchup are separated into 2 different columns, with each team surrounded by quotes. For example, Milwaukee Brewers vs New York Mets should become 'Milwaukee Brewers','New York Mets'.
  2. Modify the file so that the date column (currently in the format YYYY.MM.DD) is transformed into the format DD-MM.
  3. Remove all lines with missing data. Missing data will be represented by two consecutive commas.

csv example:

Ground,,2019.05.18,1,1,1,Seattle Mariners VS Minnesota Twins Fly,,2019.05.18,2,,2,Seattle Mariners VS Minnesota Twins Fly,96.6,2019.06.01,7,7,7,Pittsburgh Pirates VS Milwaukee Brewers

Program should be in file called script.sed and should run correctly with sed -E -i -f script.sed example-bball.csv

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!