Created
January 10, 2012 05:04
-
-
Save xntrik/1587088 to your computer and use it in GitHub Desktop.
Sometimes you need to unzip a bunch of files looking for junk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Clearing output_dir/" | |
rm -rf output_dir/ | |
FILES=*.tar.gz | |
for f in $FILES | |
do | |
echo -ne "Processing $f.." | |
tar -zxvf $f >/dev/null 2>&1 | |
grep -i 'junk' output_dir/*.txt -c | |
rm -rf output_dir/ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment