I've this type of file :
foo/foo,foo2/foo2,foo3/foo3
And I Would like this output :
foo/foo
foo1/foo1
foo2/foo2
With bash I'm able to do that (even if I sure that is not the cleanest way, but it works ) :
#!/bin/bash
numdel=3
while IFS="," read line
do
for i in $(seq 1 $numdel)
do
echo $line | cut -d',' -f$i
done
done < CSV.csv
The output is :
foo/foo
foo1/foo1
foo2/foo2
I try to reproduce the same but in powershell and I can't... There is someone to show me how to do that with powershell ?
Thanks a lot !
