my text file looks like this:
Liquid penetration 95% mass (m) = 0.000205348
Liquid penetration 95% mass (m) = 0.000265725
Liquid penetration 95% mass (m) = 0.000322823
Liquid penetration 95% mass (m) = 0.000376445
Liquid penetration 95% mass (m) = 0.000425341
now I want to delete Liquid penetration 95% mass (m)
from my lines to obtain the values only. How should I do it?
Best Answer
If there's only one
=
sign, you could delete everything before and including=
like this:If you want to change the original file, use the
-i
option after testing:Notes
-r
use ERE so we don't have to escape(
and)
s/old/new
replaceold
withnew
.*
any number of any characters(things)
savethings
to backreference later with\1
,\2
, etc.