Skip to content

Instantly share code, notes, and snippets.

@danielmwai
danielmwai / find-text-recursively.sh
Created October 24, 2018 15:36 — forked from rponte/find-text-recursively.sh
Finding files with specific text recursively using grep - unix
#!/bin/bash
# without regex pattern
grep --recursive --include=\*.java -nHIi "utf-8" /my/dir
grep --recursive --include=\*.{java,xml} -nHIi "utf-8" /my/dir
# with regex pattern
grep --recursive --include=\*.{xml,java,jspx} -nHIiE "(utf-8|iso8859-1|windows-1252)" /my/dir
##