I have a csv file on a Linux machine like this:
value1 value2 name 1 2 a 2 3 b 4 5 c
What I want is to split the
n entries in this csv into
n text files with just the corresponding numbers in that file separated by space. N is determined by the value in name.
So above csv would become:
In case there are multiple entries for a particular
name then those should go together to one file.
Ex if there was
1 2 a 21 31 a
then there should be a single
1 2 21 31