Created
March 6, 2017 17:00
-
-
Save modille/dd069f6cd6fefdf3601fe88d1c292ff3 to your computer and use it in GitHub Desktop.
Recursively find and grep through multiple Excel spreadsheets
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
# convert *.xlsx to *.xlsx.csv using https://github.com/dilshod/xlsx2csv | |
pip install xlsx2csv | |
# (shell-fu from http://stackoverflow.com/a/12965604) | |
find . -iname "*.xlsx" -exec sh -c 'xlsx2csv "$1" > "$1.csv"' x {} \; | |
# grep .csv files | |
brew install ripgrep | |
rg -i -g "*.csv" "waldo" | |
# ...or plain ole grep | |
grep -ir --include "*.csv" "waldo" . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you!