cdd bash function