add bash function extract