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
if you want to keep the order
awk
to the rescue!
$ awk 'BEGIN {FS=OFS=","}
NR==FNR {a[$1]=$2; next}
FNR==1 {print $1,$2"1",a[$1]"2"; next}
{print $1,$2,a[$1]}' file2 file1
Email,Value1,Value2
email1@email.com,2,3
email2@email.com,4,6
email3@email.com,1,8
email4@email.com,6,2
note the order of files...