perl -ne '$h{$1}=$2 for /(\w+)="([^"]*)"/g}{print qq($_\t= $h{$_}\n) for qw(id name)' myfile.txt id = 437 name = Bob