https://www.gnu.org/software/sed/manual/sed.html#Command_002dLine-Options
-n
--quiet
--silent
-e script
--expression=script Add the commands in script to the set of commands to be run while processing the input.
like this answer:
echo $'For example:\nThis is counter1 1000\nthis counter2 2000\n
this counter3 is higher value 3000\ndone.\n' |
sed -ne 's/^.* \([0-9]\{1,99\}\)/\1/p'
I understand ([0-9]\{1,99\}\) refer to pattern integer.
^refer to beginning of a the string.
.* refer to 1 or more character.
But overall, I am still confused with
sed -ne 's/^.* \([0-9]\{1,99\}\)/\1/p'
.*means 0 or more characters. For 1 or more, you need.+(with-E) or.\+. And^matches the beginning of the line