#!/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!OpenFOAM: The Open Source CFD Toolbox$!foam-extend: Open Source CFD!m; s!\| Copyright(.*?)\n!| For copyright notice see file Copyright\n!s; s!\| OpenFOAM: The Open Source CFD Toolbox \|!| foam-extend: Open Source CFD |!; s!\| OpenFOAM Extend Project: Open [sS]ource CFD \|!| foam-extend: Open Source CFD |!; s!\| Version: [1-9].[0-9][. -][ex ][x ][t ] \|!| Version: 3.0 |!; s!\| Web: http://www.OpenFOAM.org \|!| Web: http://www.extend-project.de |!; s!\| Web: www.OpenFOAM.org \|!| Web: http://www.extend-project.de |!; s!\| Web: www.extend-project.de \|!| Web: http://www.extend-project.de |!; ' $1