How do I extract the values from this data using bash and awk?
Posted
by ben Rod
on Stack Overflow
See other posts from Stack Overflow
or by ben Rod
Published on 2010-03-19T00:21:39Z
Indexed on
2010/03/19
0:31 UTC
Read the original article
Hit count: 345
I grepped these, how do I extract the values?
... cavity_2mgl_wt_strip57001.out: Total cavity volume (A3) : ( 1.240E+01) cavity_2mgl_wt_strip58001.out: Total cavity volume (A3) : ( 2.408E+00) cavity_2mgl_wt_strip60001.out: Total cavity volume (A3) : ( 4.935E+00) cavity_2mgl_wt_strip61001.out: Total cavity volume (A3) : ( 1.319E+00) cavity_2mgl_wt_strip63001.out: Total cavity volume (A3) : ( 1.532E-01) cavity_2mgl_wt_strip64001.out: Total cavity volume (A3) : ( 1.137E+01) ...
and I need the index # in the filename in bold:
cavity_2mgl_wt_strip76001.out: Total cavity volume (A3) : ( 1.276E+01)
and I need the number in the parenthesis
cavity_2mgl_wt_strip76001.out: Total cavity volume (A3) : ( **1.276E+01**)
© Stack Overflow or respective owner