$ sed '/^include /s/.*//g' file.txt abc... some text
It remove all the texts in a line which starts with
s means substitute. so
s/.*//g means replace all the texts with null.
g means global. The substitution will be applied globally.
$ sed '/^include /d' file.txt abc... some text
d means delete.
It deletes the line which starts with
include. To save the changes made(inline edit), your commands should be
sed -i '/^include /s/.*//g' file.txt sed -i '/^include /d' file.txt