bash function to decrust code