Winter is coming; it is a good idea to keep track of the current whether in Maco
ID: 3923853 • Letter: W
Question
Winter is coming; it is a good idea to keep track of the current whether in Macomb. The National Weather Service provides weather information via a web API using the following URL structure: The airport code for Macomb is KMQB. You can download the xml file using wget command: Here is the content of the KMQB.xml file: Now, you don't want all of this information. You only care about current weather condition, temperature in Fahrenheit, and the windehill in Fahrenheit. Fair 56.0 55 Write a hash script, name it weather.sh. The bash script will take in an airport code and emit current weather condition, temperature in Fahrenheit, and the windchill in Fahrenheit to standard output. For example: Your script will download the XML file and use a pipe of filters to extract the necessary information, and finally remove the xml file.Explanation / Answer
$curl wttr.in/your_location
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.