Reference no: EM132154640
Overview
In this assignment, in addition to the commands covered in the previous homework, we will work with filters
and commands such as grep and introduce sed and tr.
Part 1
This part of the assignment uses the polls.csv file from Assignment 2.
NOTE: Please use the file from the course website . . . instead of your own
polls.csv.
Copy the new file to your assignment 3 sub directory before using it.
Write commands to perform the following:
1. Show a list of all the polling organizations.
2. Count the number of unique polling organizations.
Part 2: The Dictionary and Regular Expressions
The answers to these questions require using the command grep, in some cases wc, and the dictionary file (/usr/local/tmp/csce215/Words).
The dictionary is case sensitive; keep this in mind when writing your grep commands. Also, for the purposes of these questions, only a, e, i, o, and u are vowels (not y), and a consonant is any character that is not a vowel (including punctuation).
First take a look at the contents of (/usr/local/tmp/csce215/Words). Note that each word has two entries. In normal and reverse order. In addition, the first letter of each word is uppercase.
1. Using tr, convert all upper case letters to lower case.
2. Using sed, remove the reversed copy of each word.
Hint: Each word is followed by it's reverse on subsequent lines.
Save the output of this command as a file named "words" in your home directory for use with the remaining questions.
3. Count the number of five letter words in the dictionary.
4. Count the number of seven letter words in the dictionary that start with the letter "a".
5. Output all the words in the dictionary
$HOME/words
that have exactly six consonants (non-vowels) in a row.
Hopefully that works, if not can you give me whatver you can?