Created
October 1, 2015 15:51
-
-
Save vinnybad/5124e6567161ca8eb4bd to your computer and use it in GitHub Desktop.
Finding all files of a particular type (e.g. all .strings files for iOS internalization) and adding them to a zip
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
#!/bin/bash | |
find . -name '*.strings' -print | egrep -v 'Pods' | zip source -@ | |
# Break it down: | |
# | |
# Find all files with file name ending with .strings | |
# find . -name '*.strings' -print | |
# | |
# Search for all lines that don't have 'Pods' in it (the -v means invert) | |
# egrep -v 'Pods' | |
# | |
# | |
# Zip up all files with whatever is specified via standard input | |
# zip source -@ | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment