Linux Bash script question, please help me figure out, Thank you! So this projec
ID: 3887626 • Letter: L
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 in the HW1_Data.txt:
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]$' 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
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?Explanation / Answer
RegexAnswers.sh
fi
======================================================================
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.