diff --git a/sed.md b/sed.md index e4d0492c12..509e4d01b0 100644 --- a/sed.md +++ b/sed.md @@ -50,7 +50,7 @@ Print after a given line is found. ### Print everything except matching ```bash -sed -n '/regex/d;' +sed -n '/regex/!p' ``` Print everything except lines matching regex. Useful for printing files with comments.