Remove duplicate using batch from chef


Hi @Larryc

Can I ask you question related to the batch file?
I am executing this batch file in chef.
Here I am trying to create a batch file to remove duplicate values from the comma-separated variable.

@echo off
set machines=node1,node2,node3,node2,node4,node1,node7,node6,node4

expected output: node1,node2,node3,node4,node7,node6


Take a look here, there is some regex you could run that would do it.