Guest User

Untitled

a guest
Jan 4th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. % comment
  2. filename1 pattern-to-search1
  3. filename1 pattern-to-search2
  4. ...
  5.  
  6. while read file p
  7. do
  8. if [ "${file:0:1}" != "%" ]
  9. then
  10. grep -o "$p" $file | wc -l
  11. fi
  12. done
  13. echo -e "nDone."
  14.  
  15. grep -v '^%' | while read file p
  16. do
  17. grep -c "$p" -- "$file"
  18. done
Add Comment
Please, Sign In to add comment