cgrep

Posted 2012.01.27 10:57
#!/bin/bash

function usage()
{
   echo 'cgrep grep pattern from *.[chSs] or *.cpp or *.hpp or *.mk or [Mm]akefile'
}

if [ $# -eq 0 ]; then
    usage
    exit 1
fi
 
find . -type f -name "*.[chSs]" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.mk" -o -name "[Mm]akefile" | xargs grep --color=auto -n "$1"

                                                                                                                                                          

신고
« PREV : 1 : ··· : 39 : 40 : 41 : 42 : 43 : 44 : 45 : 46 : 47 : ··· : 535 : NEXT »

티스토리 툴바