I have two csv files, I want to join them using a key value, the column of the city.
One csv file, d01.csv has this form,
Barcelona, 19.5, 29.5 Tarra
This awk may do:
awk
awk 'FNR==NR {a[$1]=$2FS$3FS$4;next} $1 in a {print $0,a[$1]}' OFS=", " d02,csv d01csv Barcelona, 19.5, 29.5, 20140916, 19.9, 28.5 Tarragona, 20.4, 31.5 , 20140916, 21.4, 30.5 Lleida, 16.5, 33.5 , 20140916, 17.5, 32.5