Skip to content

Instantly share code, notes, and snippets.

@wyattdanger
Created January 11, 2012 16:24
Show Gist options
  • Save wyattdanger/1595448 to your computer and use it in GitHub Desktop.
Save wyattdanger/1595448 to your computer and use it in GitHub Desktop.
blows away files with the bad perl shebang
for item in /opt/**/*
do
if [ -f $item ]; then
head -n1 $item | grep -q '^#!/opt/local/bin/perl'
if [ $? -eq 0 ]; then
rm $item;
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment