Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / badzipfix.sh
Created July 8, 2014 04:59
# Pipe the output of unzip -t into this to fix it spraying files all over your precious directory, rather than deflating into one nice directory like RMS intended.
# Also, there's probably a better way to do this, but it's 1AM.
awk '/OK/ { if (NF > 3) print "\42"$2,$(NF-1)"\42" ; else print "\42"$2"\42" }' | xargs rm -r