I have a text file that contains a snippet like this:
[#0] PROGRESS:Eval -- P values for mu_sig-130-0 = 1
CLs = 0.0463722 +/- 0
CLb = 0.499991 +/- 0
CLsplusb = 0.0231857 +/- 0
I would like to find the CLs line, and then print out just the number 0.0463722
Is there a way to do this via bash command line?
EDIT: the numbers can change from file to file, but the rest of that line stays the same.
awk '$1 == "CLs", $0 = $3'
Result
0.0463722
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With