#!/bin/bash perl -0777 -p -i -e ' s!(([#% ]*) *)License\n.*?\n[#%]*\n.*?\n[#%]*\n.*?\n[#%]*\n.*?\n[#%]*\n!$1License $1 This file is part of foam-extend. $2 $1 foam-extend is free software: you can redistribute it and/or modify it $1 under the terms of the GNU General Public License as published by the $1 Free Software Foundation, either version 3 of the License, or (at your $1 option) any later version. $2 $1 foam-extend is distributed in the hope that it will be useful, but $1 WITHOUT ANY WARRANTY; without even the implied warranty of $1 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU $1 General Public License for more details. $2 $1 You should have received a copy of the GNU General Public License $1 along with foam-extend. If not, see . $2 !s; s!^(([#%]*) *)\\\\ / F ield \|.*!$1\\\\ / F ield | foam-extend: Open Source CFD!m; s!^(([#%]*) *) \\\\ / O peration \|.*!$1 \\\\ / O peration | Version: 3.2!m; s!^(([#%]*) *) \\\\ / A nd \|.*!$1 \\\\ / A nd | Web: http://www.foam-extend.org!m; s!^(([#%]*) *) \\\\/ M anipulation \|.*!$1 \\\\/ M anipulation | For copyright notice see file Copyright!m; s!README file for version 3.[01]\*!README file for version 3.2*!; s/[ \t]+$//mg; ' $1