| 하위디렉토리 모든 파일에서 원하는 문자열가진 파일 검색 |
| 글 쓴 이 |
linux |
| 날 짜 |
2003년 03월 11일 11시 27분 30초 |
| 본 문 |
#!/bin/bash
[ $# -ne 1 ] &&
{
echo usage : find_string string
exit 1
}
for i in `find . ! -type d -print`;
do
grep $1 $i &> /dev/null
if [ $? = 0 ]; then
echo \"########################################################\"
echo \"file : \"$i
echo \"########################################################\"
grep $1 $i
echo
fi
done
|
|
|
|