while read;do case "$REPLY" in Name*)printf "${REPLY#*: }:";; Date*)printf "${REPLY#*:}\n";; esac done< <(cat file1 file2)>file3