Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cat << EOF | sed -e "s/^[^:]*/x1b[31m&x1b[0m/g" | sed -e "s/to/x1b[31m&x1b[0m/g"
- foo: 1 to 2
- bar: 3 to 4
- quux: 5 to 6
- EOF
- s/regexp/replacement/
- Attempt to match regexp against the pattern space. If success‐
- ful, replace that portion matched with replacement. The
- replacement may contain the special character & to refer to that
- portion of the pattern space which matched, and the special
- escapes 1 through 9 to refer to the corresponding matching
- sub-expressions in the regexp.
Add Comment
Please, Sign In to add comment