Skip to content

Instantly share code, notes, and snippets.

View duynguyenhoang's full-sized avatar

Duy Nguyen duynguyenhoang

View GitHub Profile
@peterhost
peterhost / findall.sh
Created November 12, 2010 16:52
FIND string in files: bash script to easilly find a given string in all files of a given type in the current directory and its subdirectories (.git dirs excluded) and print the results with some colors
# ---------------------------------------------------------------------------
# FIND string in (regular) files
# https://gist.github.com/674341
# -> finds a given string in all files of a given type in the current
# directory and its subdirectories (.git directory contents excluded,
# directories excluded)
function findall()
{
#CUSTOM COLORS : declare them as local variables so as not to clutter your BASH ENVIRONMENT