Advertisement
pkramer

trashremove

Aug 5th, 2011
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.25 KB | None | 0 0
  1. for f in datafiles/*; do cat $f | grep "DATA" | wc -l | awk '{if ($1 < 480) {print "BAD"} else {print "GOOD"}}'; done
  2.  
  3. # remove bad files
  4. for f in datafiles/*; do cat $f | grep "DATA" | wc -l | awk -v f=$f '{if ($1 < 480) {print "rm", f}}' | sh; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement