2) Use wc and grep to count the number of mountains located at Rabun County. Hint: please use pipe L.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

putty program for unix

 

Sample Output
Brasstown Bald ,(summit),4784,feet,Union County
Hightower Bald, (summit),4568, feet, Towns County
Wolfpen Ridge, (ridge high point),4561, feet, Towns and Union Counties
Blood Mountain, (summit),4458, feet, Union County
Tray Mountain, (summit), 4430, feet, Towns County
Slaughter Mountain, (summit),4338, feet,Union County
Coosa Bald, (summit),4280, feet, Union County
2) Úse wc and grep to count the number of mountains located at Rabun
www
County.
Hint: please use pipe L.
Sample Output
3) Finish task 2) by using only grep.
Hint: open the manual page of grep, and check -c option.
4) A. Type command sed 's/ridge high point/r.h.p./p' mountainList.txt
and execute it. Then attach a screenshot of the output.
B. Type command sed -n 's/ridge high point/r.h.p./p' mountainList.txt
and execute it. Then attach a screenshot of the output.
C. Open the manual page of sed and describe what does -n do in sed?
D. Describe what does the sed command in (B) do?
5) Use sed to remove the leading spaces in "mountainList.txt" and print out
the processed lines.
6) Finish task 5) and save the output to file "newList.txt".
Transcribed Image Text:Sample Output Brasstown Bald ,(summit),4784,feet,Union County Hightower Bald, (summit),4568, feet, Towns County Wolfpen Ridge, (ridge high point),4561, feet, Towns and Union Counties Blood Mountain, (summit),4458, feet, Union County Tray Mountain, (summit), 4430, feet, Towns County Slaughter Mountain, (summit),4338, feet,Union County Coosa Bald, (summit),4280, feet, Union County 2) Úse wc and grep to count the number of mountains located at Rabun www County. Hint: please use pipe L. Sample Output 3) Finish task 2) by using only grep. Hint: open the manual page of grep, and check -c option. 4) A. Type command sed 's/ridge high point/r.h.p./p' mountainList.txt and execute it. Then attach a screenshot of the output. B. Type command sed -n 's/ridge high point/r.h.p./p' mountainList.txt and execute it. Then attach a screenshot of the output. C. Open the manual page of sed and describe what does -n do in sed? D. Describe what does the sed command in (B) do? 5) Use sed to remove the leading spaces in "mountainList.txt" and print out the processed lines. 6) Finish task 5) and save the output to file "newList.txt".
The following table is from Wikipedia. It shows the eleven highest mountains
in Georgia.
Brasstown Bald, (summit),4784,feet,Union County
Rabun Bald, (summit),4696,feet,Rabun County
Dick's Knob, (summit),4620,feet,Rabun County
Hightower Bald, (summit),4568,feet, Towns County
Wolfpen Ridge, (ridge high point),4561,feet,Towns and Union
Counties
Blood Mountain, (summit),4458,feet, Union County
Tray Mountain, (summit), 4430,feet,Towns County
Grassy Ridge, (ridge high point),4420.feet, Rabun County
Slaughter Mountain, (summit),4338,feet, Union County
Double Spring Knob, (summit),4280,feet, Rabun County
Coosa Bald, (summit),4280,feet, Union County
In above table, each line contains 5 fields separated by comma and please
download the file " mountainList.txt" by the following command (internet access
required):
cp
/home/fzhao6/public/mountainList.txt
mountainList.txt
Be sure it succeeds using "Is" to see the file name “mountainList.txt" listed.
1) Use grep to print all lines where the mountains are at Towns or Union
County.
Transcribed Image Text:The following table is from Wikipedia. It shows the eleven highest mountains in Georgia. Brasstown Bald, (summit),4784,feet,Union County Rabun Bald, (summit),4696,feet,Rabun County Dick's Knob, (summit),4620,feet,Rabun County Hightower Bald, (summit),4568,feet, Towns County Wolfpen Ridge, (ridge high point),4561,feet,Towns and Union Counties Blood Mountain, (summit),4458,feet, Union County Tray Mountain, (summit), 4430,feet,Towns County Grassy Ridge, (ridge high point),4420.feet, Rabun County Slaughter Mountain, (summit),4338,feet, Union County Double Spring Knob, (summit),4280,feet, Rabun County Coosa Bald, (summit),4280,feet, Union County In above table, each line contains 5 fields separated by comma and please download the file " mountainList.txt" by the following command (internet access required): cp /home/fzhao6/public/mountainList.txt mountainList.txt Be sure it succeeds using "Is" to see the file name “mountainList.txt" listed. 1) Use grep to print all lines where the mountains are at Towns or Union County.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education