You have been given the file awards.psv This file contains information about Nobel Prize, Turing Award and Fields Medal winners Each line in the file contains the following six fields: 1. Award Name 2. Award Year 3. Winner Name 4. Winner Gender 5. Winner Country 6. Winner Birth Year Each field is separated from the next field by a pipe character ( | ). Your task is to write four grep commands which will print specified lines from this file. You have been given the file final_q1.txt . In final_q1.txt add answers to the four questions. Add each answer in the specified location. Do not add, remove, or change any other text in the file. The autotest depends on the exact format of the file. Each question should be answered with a single grep command. You may use any regular expression syntax supported by grep. You may use any options supported by grep except -P/--perl-regexp . 1. Question 1 Write a grep command that will print the lines in awards.psv that contain awards won by an Australian.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter14: Files And Streams
Section: Chapter Questions
Problem 2CP: In Chapter 11, you created the most recent version of the MarshallsRevenue program, which prompts...
icon
Related questions
Question

You have been given the file awards.psv
This file contains information about Nobel Prize, Turing Award and Fields Medal winners
Each line in the file contains the following six fields:
1. Award Name
2. Award Year
3. Winner Name
4. Winner Gender
5. Winner Country
6. Winner Birth Year
Each field is separated from the next field by a pipe character ( | ).
Your task is to write four grep commands which will print specified lines from this file.
You have been given the file final_q1.txt .
In final_q1.txt add answers to the four questions.
Add each answer in the specified location.
Do not add, remove, or change any other text in the file.
The autotest depends on the exact format of the file.
Each question should be answered with a single grep command.
You may use any regular expression syntax supported by grep.
You may use any options supported by grep except -P/--perl-regexp .
1. Question 1
Write a grep command that will print the lines in awards.psv that contain awards won by an Australian.
2. Question 2
Write a grep command that will print the lines in awards.psv that contain a female ACM Turing Award winner.
3. Question 3
Write a grep command that will print the lines in awards.psv that contain awards won by a person born between 1990 and 1999
(inclusive).
4. Question 4
Write a grep command that will print the lines in awards.psv that contain awards won by a person with first name, last name, and
middle initial starting with the same letter.
Your example to each question will be a single grep command.
You can test the command by running it.
For example, if you think the answer to question 1 is grep -E 'Andrew' awards.psv ,
you can test it:
$ grep -E 'Andrew' awards.psv
ACM Turing Award|2000|Andrew Chi-Chih Yao|Male|China|1946
Nobel Prize for medicine|1963|Andrew F. Huxley|Male|United Kingdom|1917
Nobel Prize for medicine|2006|Andrew Z. Fire|Male|United States|1959
Nobel Prize for medicine|1977|Andrew V. Schally|Male|United States|1926
ACM Turing Award|2017|David Andrew Patterson|Male|United States|1947
Then add it to final_q1.txt .
Autotest will extract your answers from final_q1.txt and do a simple test.
NOTE:
Your answer for each question must be a single grep command only
For example: grep -E Andrew awards.psv
You may not use the -P/--perl-regexp option to grep
You may use any other grep option, for example you can use grep's -E option.
You may quote the arguments to grep.
You may not use any commands other than grep, for example, you can not use sed or cut.
You can not use pipes, or I/O redirection.
You can assume that the pipe character ( | ) will only appear as a field separator.
Note the input is unordered. It is not sorted in any way.
You may not use Shell , C , Python , Perl , or any other language.
When you think your program is working, you can run some simple automated tests:
$ 2041 autotest final_q1
When you are finished working on this activity, you must submit your work by running give:
$ give cs2041 final_q1 final_q1.txt
To verify your submissions for this activity:
$ 2041 classrun -check final_q1

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L