Does anyone already have a working bash script to do this?