replace sed command with plain groovy