Created
August 7, 2018 01:42
-
-
Save naganowl/bf7a685625916264fe30b23c40a82947 to your computer and use it in GitHub Desktop.
Double loop over files for better performance
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
# Assumes two files present (`sel` and `filez`) | |
# OSX needs an empty zero length argument, which is quite difficult to escape if using the same type of quotations | |
# Inner file (`filez`) is used over a `find ... -exec` to cut down on repetitive operations | |
cat sel | xargs -I '{}' sh -c 'cat filez | xargs sed -i "" "s/{}//"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment