Nice commandline scripts in php/bash