I want to expand the recursive search of symlinks to include only .tex files find . -type l -name "Math*" -exec grep -d "recurse" word {} +
. Failed pseudocode 1
find . -type l -name "Math*" \
-exec WHERE CHOOSE ONLY .tex files and Directories \
-exec grep -d "recurse" word {} +
I cannot type a command for choosing .tex files and directories. In words, pseudocode 2
- Find all symlinks with name "Math" which point to directories.
- Recurse all symlinked directories (I think grep is limiting here possibly)
- Do basic
grep word
in file list
How can you do the step (2)?
basename $(readlink '{}')
should be your friend.