I needed to search for a character sequence of tab0tab ([TAB]the number zero[TAB]) while using grep and I tried using the -E option, but did not succeed. The following does:
cat digikamtags.txt | grep -c $’\t0\t’
cat digikamtags.txt | grep -Pc ‘\t0\t’
And here is another example, when using exiftool to find one of several tags:
exiftool -s -G * | grep -Eil “Subject|Tag|Comment|Hierarchical”
See this Stackoverflow thread for additional related information.
Leave A Comment
You must be logged in to post a comment.