Created
October 16, 2015 15:26
-
-
Save sparkida/87ede0717d65fd8eb828 to your computer and use it in GitHub Desktop.
search for files matching text
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
#!/bin/bash | |
search="s/$@//p" | |
find . -type f -name '*.js' | while read file; do found=$(sed -n "$search" "$file"); if [ ! -z "$found" ]; then echo "$file"; fi; done; |
Author
sparkida
commented
Oct 16, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment