Created
May 5, 2015 07:10
-
-
Save debidatta/5cd6b62208ce2660bffe to your computer and use it in GitHub Desktop.
Grep for files in a directory in another file
This file contains hidden or 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
ls directory | cut -d'.' -f1 | xargs -n 1 -i grep {} file_to_search_in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment