Created
March 8, 2016 15:46
-
-
Save dshaw002/d8891ae3612a5556314b to your computer and use it in GitHub Desktop.
Notes on Searching for file metadata through lots of directories!
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
Problem: Need to search files in subdirectory for metadata | |
Solution: | |
1) Find files and matches and output to data file | |
a) Use find to get loop of files.. | |
b) identify -verbose to get metadata of files.. | |
c) grep to get lines around match.. | |
d) cat to output it to results file | |
2) Make sense of response data | |
a) Reverse lines because searching backwards in regex is idk | |
b) Do match search to get data | |
c) No sublime, grep with PCRE multiline | |
d) MACOSX caveat: MAC uses FreeBSD grep, need to use homebrew dups with grep to get GNU grep labelled ggrep in command line | |
e) | |
3) Profit | |
4) Better method is to use identify -format "%d%f %[IPTC:2:60] %[IPTC:2:110] %[IPTC:2:160]" but I messed up so had to go long way :-( | |
Better Solution... Improve the identify to get the tags for iptc metadata |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment