I have a directory with subdirectories and files structured like this:
01/fileA
01/fileB
01/fileC
02/fileD
02/fileE
03/fileF
03/fileG
03/fileH
04/fileI
I'd like to get a CSV that looks like this:
01, fileA, fileB, fileC
02, fileD, fileE
03, fileF, fileG, fileH
04, fileI
In other words, I want to generate a CSV with one row per subdirectory, with files listed as columns.
Is it possible to do this from the Linux command line?