I am trying to edit a numeric value in a file with sed command. I know the exact line and column of the value needs to change.
Let's say;
Line: 2, Column: 21
and this is the file I am trying to edit, i.e. example.txt
hello
this is my number = 131;
world
However, this numeric value may vary in terms of digits, e,g, 30 or 130.
If I want to set this number to 32,
how can I find and replace this numeric value? Assuming that I do not know the numeric value beforehand.
So far, I can only use sed with known keywords and lines;
sed -i '' -e '2s/131/32/' example.txt