0

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
4
sed -e '\|\#includedir /etc/sudoers\.d|q' /etc/sudoers
| improve this answer | |
  • 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.