I'm having a folder with CSVs like:
A.csv
pet1;dog
pet2;monkey
B.csv
pet1;cat
pet2;wolf
I can now reformat those in bash (Linux):
for filename in *.csv; do
CSVBody=$(cat $filename | cut -d ";" -f2 | paste -sd ";" -)
echo -e "$CSVBody" >> ./converted/merged.csv
done
To get
merged.csv
dog;monkey
cat;wolf
Unfortunately, I'm a long time away of windows. How would I cut, paste and pipe to a file in bash?