Created
April 2, 2020 16:24
-
-
Save dixonge/18da7ba740c360376f798ed3ac4c9323 to your computer and use it in GitHub Desktop.
Delete lines *after* a pattern match in all files in a folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ./ -type f -exec sed -e '/pattern/{n;N;N;N;N;d}' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment