add some useful bash function for start up scripts