Question

Given the following text file, Write down the commands for the tasks Brasstown Bald,(summit),4784,feet,Union County Rabun...

Given the following text file, Write down the commands for the tasks

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 
Grassy Ridge,(ridge high point),4420,feet,Rabun County

1) Use grep to find out the mountains with ridge high point. (The entire line, not just the name of the mountain)

2) Use egrep to output the mountains which is a bald or knob. (The entire line, not just the name of the mountain)

3) Use awk to convert the value of height from feet to meter and provide a line number for each line. (e.g. 2,Rabun Bald,(summit), 1431.34,meter,Rabun County). The result should be stored in the file named ‘newMountainList.txt’.

4) Use sed to delete the second field (including the ‘,’ after it) in each line in the file “mountainList.txt”.

5) Use awk to count how many mountains belonging to each county. The result should go to a new file with name ‘CountyMountain.txt’. The format of result should be: County_name number_of_mountains (e.g. Union County 5) (Hint: Assume Wolfpen Ridge belongs to both Town and Union County).

6) Use sort to sort CountyMountain.txt according to the number of mountains in descending order, and output the two counties with the most number of mountain.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer: Note: some compilers will not accept theO. In such cases remove that and compile File creation S cat demol file conDicks Knob (summit),4620,feet Rabun County Hightower Bald (summit),4568,feet, Towns County 5.Save this as countyMountain.txt

Add a comment
Know the answer?
Add Answer to:
Given the following text file, Write down the commands for the tasks Brasstown Bald,(summit),4784,feet,Union County Rabun...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT