2018-02-05 Extract all lines containing ``magic word'' plus one line thereafter: grep -A 1 "magic word" (It is much more difficult if the requirement is written as: Re- move all lines but ones containing ``magic word'' and one line thereafter.) Here's an in-place variant: sed -i -n '/magic word/,/^/p' datei [0] [0] https://debianforum.de/forum/viewtopic.php?f=34&t=168563 http://marmaro.de/lue/ markus schnalke