I am trying to match bla = 0.05
and replace the number with 1234 in a file. Expected output is bla = 1234
Code I tried:
sed -i '' "s/\(bla\)\(.*\)\([-+]?[0-9]*\.?[0-9]*\)/#\1\21234/g" foo
Also, why do I sometimes need ''
and sometimes not to call sed
?