#!/bin/sed -rf # Note: uses GNU sed extensions; might not work with other implementations s/(^[ \t]*)\/\1alchType fep\n\1alch/I s/(^[ \t]*)\/\1alchLambda/I s/(^[ \t]*)\/\1alchLambda2/I s/(^[ \t]*)\/\1alchDecouple/I /^[ \t]*\/I { s/fep/alch/I }