To include a hyphen ('-') in a range expression, it must be escaped and placed either at the start or end of the expression.
To remove color escape sequences from files, such as in text files generated by
logging colorized terminal stdout
, use:
sed 's/\x1b\[[0-9;]*m//g'
To match all text after a particular pattern, use:
... | sed -n '/<regex</,$p'
Note that this will include the pattern-matched line itself in the output.
sed -e '/pattern1/,/pattern2/d'