You are located on Linux system directory (/data/oklahoma_mesonet/2009/ for this
ID: 3622979 • Letter: Y
Question
You are located on Linux system directory (/data/oklahoma_mesonet/2009/ for this exercise) containing Oklahoma Mesonet daily data for an entire year with each file containing all of the data for a single day. The file structure looks like:20090101_meso.dat where the file name is 4-digit year, 2 digit month, and 2 digit day.
20090102_meso.dat
20090103_meso.dat
20090104_meso.dat
....etc......
Inside each file, data from the entire network is contained. This data looks like:
101! (c) 2009 Oklahoma Climatological Survey and the Oklahoma Mesonet - all rights reserved 22 2009 12 10 00 00 00
STID STNM TIME RELH TAIR WSP
ADAX 1 660 88 -10.8 0.6
ALTU 2 660 78 -8.9 2.9
ANTL 4 660 94 -10.4 0.7
ARNE 6 660 -996 -996 -996
....etc......
What one line command would you run to tell you how many times the Woodward, whose station identifier (STID) is WOOD, station had days with missing data (designated by -996) in December of 2009?
Explanation / Answer
awk '/WOOD /' '/-996/' /data/200912* | wc -l
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.