I have a list of files that should contain the following
Im trying to find the items of interest that are missing from each file and create a csv.
cat *.txt | while read file
do
grep 3500[1-6] file | tr '\012' ','
done
My problem is this possible output
one.txt 35001,35002,35005,35006
two.txt 35002,35003,35004,35005,35006
three.txt 35001,35002, 35003,35004,35005,35006
four.txt 35001,35006
What Im after is
one.txt 35001,35002,,,35005,35006
two.txt ,35002,35003,35004,35005,35006
three.txt 35001,35002, 35003,35004,35005,35006
four.txt 35001,,,,,35006
This way, when I move it into the Microsoft environment the colums will be aligned correctly.