×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Jing Tai Piao
Added: Sep 10, 2012 6:54 AM
Modified: Sep 10, 2012 7:17 AM
Views: 40
Tags: no tags
  1. MYPATH=$1
  2.  
  3. find "$MYPATH" -name *.jpg > /tmp/patterns
  4. find "$MYPATH" -name *.png >> /tmp/patterns
  5. find "$MYPATH" -name *.gif >> /tmp/patterns
  6.  
  7. for p in $(cat /tmp/patterns); do
  8.     f=$(basename $p);
  9.  
  10.     find "/ipscape/iweb/jing/ams/"  -name '*.css'  -exec grep -nH $f {} \; > /tmp/result
  11. done
  12.