Heya, I have a small problem i need some help with.
I have a directory of CSV files about 250 of them, that i need to search
though and and generate some totals from.
I can quite easily join all the files together using a 'copy *.csv
full-list.csv' so that i need only work on one file rather than work my
way though a the directory one by one.
The files contain a non unique id (unique to the file, but not the set
of files) followed by a name. So it looks like this;
a,katie,
a,natasha,
a,monica,
...
etc
There are 250 files like this. What i need to do is find all the unique
names in the whole set (all the files) and then how many times those
names occur. i.e. how many 'katies' occur across all 250 files.
This needs to be outputted just as each unique name and a total.
kate,15,
monica,11,
natasha,4,
Also if it is possible i'd also like to have the id's that occur with
each occurrence of a unique name outputted in some manner. Perhaps as a
quoted encapsulated string in a third column. Something like this....
katie,15,"a,b,c,d,e"
All seems a tiny bit complicated and a bit much to get my head around.
Can anyone have a shot provide code that will provide me with the unique
names and the total occurrences?
Many thanks in advance,
Hardeep.