Can the following be done easily with Unix/Linux shell command line? It's easy in Python/Ruby but I'm curious how much more minimalist it could be (if it can be done at all) in shell:
Take these two files (there could be many more, but for this example just two) and combine them also adding a field and populate depending on file name.
Input
File0001.csv:
FieldB,FieldC
A,0
A,1
A,2
File0002.csv:
FieldB,FieldC
B,0
B,1
B,2
Output
FileCombined.csv
FieldA,FieldB,FieldC
0001,A,0
0001,A,1
0001,A,2
0002,B,0
0002,B,1
0002,B,2
FieldA = is generated on the file it came from. Hopefully the field names/lines of text don't have to be treated as separate entities but just text.