>>250
面白いね
sedの勉強ということなんで短い版

#!/bin/sed -nf
1,/^$/d
/^label ..[^ ]/{s/^label \(.*\)/\1: /;h}
/^append .*lang=/{s/^.*\(lang=\)/\1/;H;x;s/\n//;p}