#!/bin/sh

echo step 1
find -type f -exec sh -c "file \""{}"\" | grep -q shell || rm \""{}"\"" \;

echo step 2
find -type f -exec sh -c "cat \""{}"\" | grep -m 1 -q \"xmessage\\|gtkdialog\\|yaf-splash\\|Xdialog\" || rm \""{}"\"" \;

echo step 3
find -type d -empty -delete
