functions about bash scripts