deDust is a simple bash script to clean up wallet inputs, written to work on Denarius. This searches through listunspent on a running wallet daemon and looks for minimum balance and inputs based on user input. From there this creates the rawtransaction to combine all the inputs and sends back to the same address. Its like an automated QT coin control which also keeps the inputs separated so addresses don't get tied together. Very basic bash script using jq, bc, sed, awk and maybe someone who knows what they are doing can make this even more useful. Not sure if there is a limit of inputs per send but I hope someone finds out what the limit could be. I like to keep text files of what I am doing so that's why my scripts create them. In this case if you hit an input limit you could manually take one of the .txt files and quickly do the raw transactions manually.
No private keys being used as the idea is this runs on the user live wallet.
This was intended for Denarius but should be able to change the txfee and daemon calls to work with whatever bitcoin forks.
Someone could tweak this to getnewaddress per send and send each combination of inputs out to a new address 1 by 1, or send it all to 1 address.
WARNING: I am not responsible if you screw this up, think before changing the txfees, or if you have no idea what you are doing.
https://gist.github.com/buzzkillb/878ff03068f141b01fa8afdcc92d9a25