Другой:
$ awk 'BEGIN{FS=OFS="|"}($1 in a)&&FNR>1{print $1,a[$1],$NF,a[$1]* $NF}{a[$1]=$NF}' file1 file2
выходы:
Jimmy|20000|90000|1800000000
Объяснил некоторые, используя Джимми:
$ awk '
BEGIN { FS=OFS="|" } # set separators
($1 in a) && FNR>1 { # if key to hash (Jimmy) is in a excluding headers
print $1,a[$1],$NF,a[$1]* $NF # process Jimmy
# next # this excludes new Jimmy from being rehashed to a
}
{
a[$1]=$NF # ... in here where everything is hashed and the
}' file1 file2 # ... existing rehashed