This question already has an answer here:

I am trying to remove all (including new lines) content with sed that comes after the following text in a file (/etc/sudoers):

#includedir /etc/sudoers.d

marked as duplicate by don_crissti, Archemar, countermode, GAD3R, thrig Apr 13 '17 at 18:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

sed -e '\|\#includedir /etc/sudoers\.d|q' /etc/sudoers
  • Thank you so much! I should have asked a lot sooner. Been beating my head against the wall on this one. – Jason Apr 12 '17 at 22:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.