Skip to content

Instantly share code, notes, and snippets.

@mattchainsaw
Last active May 11, 2016 21:37
Poetry for Plebs. Recursively search for instance of a string in all files and subfolders. Usage: ./where.sh <regex>
#!/bin/bash
find . -type f |
while read x
do
cat $x | egrep --color=always "$1" &&
echo -e "\e[36m$x\e[0m" &&
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment