-3

From a previous command in the Linux Terminal (teqc +qc filename), I receive the following output directly in the Terminal:

QC of RINEX  file(s) : whcr0010.18o
*********************

4-character ID          : WHCR
Receiver type           : TRIMBLE NETR9 (# = 5240k50059) (fw = 4.85)
Antenna type            : TRM57971.00     NONE (# = 5000113587)

Time of start of window : 2018 Jan  1  00:00:00.000
Time of  end  of window : 2018 Jan  1  23:59:45.000
Time line window length : 24.00 hour(s), ticked every 3.0 hour(s)
Observation interval    : 15.0000 seconds
Total satellites w/ obs : 31
NAVSTAR GPS SVs w/o OBS :  4 
Rx tracking capability  : 44 SVs
Poss. # of obs epochs   :   5760
Epochs w/ observations  :   5590
Epochs repeated         :      0  (0.00%)
Complete observations   :  53001
 Deleted observations   :   2489
Obs w/ SV duplication   :      0  (within non-repeated epochs)
Moving average MP12     : 1.294348 m
Moving average MP21     : 0.700641 m
Points in MP moving avg : 50
Mean S1                 : 44.73 (sd=5.21 n=55490)
Mean S2                 : 31.54 (sd=7.99 n=53001)
No. of Rx clock offsets : 0
Total Rx clock drift    :  0.000000 ms
Rate of Rx clock drift  :  0.000 ms/hr
Avg time between resets : Inf minute(s)
Freq no. and timecode   : 2 13875 ffffff
Report gap > than       : 10.00 minute(s)
       but < than       : 90.00 minute(s)
epochs w/ msec clk slip : 0
other msec mp events    : 0 (: 493)   {expect ~= 1:50}
IOD signifying a slip   : >400.0 cm/minute
IOD slips               :    175
IOD or MP slips         :    222
      first epoch    last epoch    hrs   dt  #expt  #have   %   mp1   mp2 o/slps
SUM 18  1  1 00:00 18  1  1 23:59 23.29  15     -   53001  -   1.29  0.70    239

From here, I wish to extract the following information: name of file (whcr0010.180) and observation interval (15.00). Also, if I could append this information to a text file that would be great as well.

  • 6
    Please don't post screenshots of text. Copy and paste it directly into your question in a code block. – Jesse_b May 11 '18 at 14:26
  • extracting information from terminal output with grep/awk/sed/cut... has been asked like a billion times on this site and others, you could have looked it up, or asked in your distro's forum's newbie section. – Cestarian Oct 27 '18 at 20:34
1

The following awk command should perform what you need:

teqc +qc filename | awk -F: '$1 ~ "QC of RINEX  file" || $1 ~ "Observation interval" {print $2}' >>output.txt
  • If you downvoted because there is something wrong with my answer please let me know so it can be fixed, otherwise the bad code will remain...(Although I'm quite certain it is actually fine) – Jesse_b May 11 '18 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.