Hello, I have found an unexpected behavior of sed. I would expect the same output for the following commands: sed '/root/!d' /etc/passwd sed '/root/{ !d }' /etc/passwd $ sed --version sed (GNU sed) 4.7 Packaged by Debian Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Jay Fenlason, Tom Lord, Ken Pizzini, Paolo Bonzini, Jim Meyering, and Assaf Gordon. GNU sed home page: . General help using GNU software: . Fehlerberichte bitte per E-Mail (auf englisch) an: . Seen ouotput: $ sed '/root/!d' /etc/passwd root:x:0:0:root:/root:/bin/bash $ sed '/root/{ !d }' /etc/passwd root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync ... the whole file BR, Stefan Scheruebl