A file has a line pattern where a line that does not contains numbers occurs twice in the file.
Energy initial, next-to-last, final =
-87057.8200168321 -87208.7223900015 -87208.7197287879
Energy initial, next-to-last, final =
-87208.7197287879 -87208.7223900015 -87310.7197287879
I want to extract value -87310.7197287879 which is the value at the end of the line following the 2nd occurrence of the line that does not contain numbers.
How can I do this with Awk or Sed ?
awk 'END{print $NF}' file?awk 'NR%4==0 { print $NF }' infile