Created
February 3, 2022 20:12
-
-
Save ollytheninja/179f029c345db369572e2e18840470ef to your computer and use it in GitHub Desktop.
Remove specific lines from a bunch of files
This file contains hidden or 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
| # When you need to remove a tag from a bunch of Terraform | |
| find . -type f -name "*.tf" -exec sed -i -e '/^.*git_commit.*$/d' {} \; | |
| # Probably want to delete the "-e" files that were created for all files that didn't have the tag in them | |
| find . -type f -name "*.tf-e" -delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment