This probably will do better than what the OP is thinking:
Code:
ls | grep -v ".sh" | xargs rm -rf
You see, ls unlike ll doesn't list modes or anything like that by default, so technically because of that rm doesn't think those modes (i.e. -rw-rw-r--) are switches, flags, or options passed to rm.