Home/Regular Expressions & grep

Regular Expressions & grep

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.

By |2019-01-21T17:17:26-05:00January 21st, 2019|Home Computing|0 Comments

About the Author:

Leave A Comment

Go to Top