Ranges in
sed are ranges of entire lines -- /pmin=/,/,factor/ means print each line starting with a line containing "pmin=" through a different line containing ",factor" (and starting over again if a subsequent line matches "pmin=" again).
You could do
Code:
sed -e 's/.*pmin=//;s/,factor.*//' checkpoint.txt
which will replace from start of line through "pmin=" with empty line, and ditto from ",factor" through to end of line. The result is still printed regardless of whether the resulting line is empty or not.