Hi I have 2 csv\'s in the following format, (basically a list of email and the number of times we have been emailed by that sender):
file1.csv
Email,Val
using join
program
join -t, -o0,1.2,2.2 -a1 -a2 <(sort
otherwise if files are already sorted and contain the same entries with bash builtins
while
IFS=, read -u3 em1 val1
IFS=, read -u4 em2 val2
[[ -n $em1 ]] && [[ -n $em2 ]]
do
if [[ $em1 = $em2 ]]; then
echo "$em1,$val1,$val2"
else
echo "ERROR: $em1 <> $em2"
fi
done 3