while read L; do
    TAG=$(echo $L | cut -d "=" -f1 | sed "s#\ ##g")
    if [[ $(echo $TAG | grep -c "\.") == 1 ]]; then
        PTBR=$(grep "^${TAG}\ " Messages_pt_BR.properties)
        if [[ $(echo $PTBR | wc -m) > 1 ]]; then
            echo $PTBR
        else
            echo $L
        fi
    else
        echo $L
    fi  
done < Messages.properties
