Question: Being frustrated with the speed of the android emulator running on a ARM image, as soon as I discovered the intel atom image I used it right away. There was a immediate speed boost (boot going from 30 sec to 3 sec) but my application no longer works completely. All the XML portions of the app work, but as soon as I move to my activity which is all surfaceview and canvas work the screen goes black. It does not crash and there are no errors in logcat. The stranger thing is that I have a previously developed application which implements similar things (canvas and surfaceviews mostly) which works fine on the new image. 

Does anyone have any idea why this would be happening?

System Information: Hardware: intel xeon quad core processor; 6 gb RAM, Nvidia 610 graphics card
OS: Ubuntu 13.04 64 bit

Answer: 
This is a good problem for `awk`:

```
awk 'NR==FNR{a[$1]=$0;next}{print a[$1]"+"$NF}' file1 file2

```

Slightly more robust:

```
awk -F' yield ' '{a[$1]=($1 in a)?a[$1]"+"$2:$2}END{for(i in a)print i" yield "a[i]}' file1 file2

```

or

```
awk 'BEGIN{FS=OFS=" yield "}{a[$1]=($1 in a)?a[$1]"+"$2:$2}END{for(i in a)print i,a[i]}' file1 file2 

```

If you don't really need the +, you might be able to use `join`:

```
join -11 -21 -o1.1,1.2,1.3,2.3 file1 file2

```

This is a bit simpler but more fragile (and needs the files to be sorted; you can replace `file1` with `<(sort file1)` and the same for 2, if needed).
A 99% pure [bash](/questions/tagged/bash "show questions tagged 'bash'") solution (the remaining 1% is a `cat`). Uses associative arrays:

```
#!/bin/bash
declare -A a;

while read -r n y b; do
    [[ $y = yield ]] && a[$n]+=${a[$n]:++}$b
done < <(cat file1 file2)

for i in "${!a[@]}"; do
    echo "$i yield ${a[$i]}"
done

```

It will get slow if you have large files. In that case, use the `awk` methods given in the other answers.

If a line doesn't contain the word `yield` in second position, it is silently ignored.