On Fri, 19 Feb 2016 06:15:06 +0200 ac <a...@main.me> wrote: > > use bash :) > > do something like > #!/bin/bash > LST=`find ./ -name '*.php'` > for FILENAME in "$LST"; do > sed -i -e "s/$FROM/$TO/g" $FILENAME > done > > hth > ac > <r...@reedmedia.net>: host mail.reedmedia.net[64.85.162.118] said: 550 Invalid email (in reply to end of DATA command) http://emailmediator.com/company/ - nice pic Jeremy :) (my pic is here: https://wishes.me )
Are you blocking #! after the Subject: tag? (or just me :) ) > > On Thu, 18 Feb 2016 15:05:53 -0600 (CST) > "Jeremy C. Reed" <r...@reedmedia.net> wrote: > > > On Thu, 18 Feb 2016, Jeremy C. Reed wrote: > > > > > I am looking for a command-line tool to do multi-line > > > replacements. Something like: > > > > > > the-tool --search file-containing-lines-to-match \ > > > --replace file-containing-new-lines < original-file > new-file > > > > > > Does anyone know of a tool like this? > > > > > > I can do it with sed like: > > > > > > sed -e :a -e '$!N;s/^string1\nstring2$/string3\ > > > string4/;ta' -e 'P;D' > > > > Actually that won't work for more than one \n in the lhs. > > > > $ cat ~/J > > AA > > BB > > CC > > DD > > EE > > > > $ sed -e :a -e '$!N;s/BB\nCC\nDD/11\^J22/;ta' -e 'P;D' < ~/J > > AA > > BB > > CC > > DD > > EE > > > > $ sed -e :a -e '$!N;s/BB\nCC/11\^J22/;ta' -e 'P;D' < > > ~/J AA > > 11 > > 22 > > DD > > EE >