Question: Linux Bash script question, please help me figure out, Thank you! So this project require me to use grep command to find out these things

Linux Bash script question, please help me figure out, Thank you!

So this project require me to use "grep" command to find out these things in the HW1_Data.txt:

Linux Bash script question, please help me figure out, Thank you! So

I have already solved it:

1: grep -c '[0-9]$' HW1_Data.txt

2:grep -c '^[^aeiouAEIOU]'

3: grep -E -c '^[A-Za-Z]{12}$'

4:grep '^[0-9]\{3\}\-[0-9]\{3\}\-[0-9]\{4\}$' HW1_Data.txt

5:grep '^303\-[0-9]\{3\}\-[0-9]\{4\}$' HW1_Data.txt

6.grep -c '^[aeiouAEIOU]\w*[0-9]\b$' HW1_Data.txt

7.grep -c 'geocities\.com$' HW1_Data.txt

But I am confuse about how to turn my answer into the Bash script and take user input? I am new to this.

It seems it will use other files to test my command, but I don't know how to do this. Please help

this project require me to use "grep" command to find out these

1. How many lines end with a number? 2. How many lines do not start with a vowel? 3. How many 12 letter (alphabet only) lines? 4. How many phone numbers are in the dataset (format: ___-__--____')? 5. How many city of Boulder phone numbers (e-g. starting with 303- 6. How many begin with a vowel and end with a number? 7. How many email addresses are from geocities? (e.g. end with'geocities.com')? 0

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!