[CS-FSLUG] Sed and other tools

Robert Wohlfarth rbwohlfarth at gmail.com
Thu Jul 7 21:59:41 CDT 2011

On Thu, Jul 7, 2011 at 9:10 PM, Ed Hurst <ehurst at soulkiln.org> wrote:

> I assume sed is not necessarily the proper tool for this task, or
> perhaps not the whole task. After re-reading the most recent discussion
> on sed, I was hoping to accomplish something a bit more complicated for
> a similar context.

You could try this little Perl script:

foreach my $file (@ARGV) {
open my $in, "<$file";
my @slurp = <$in>;
close $in;
my $all = join( "\n", @slurp );
$all =~ s/softedges\s*at\s*softhome\s*dot\s*net/eddie at soulkiln dot org/m;
open my $out, ">$file.new";
print $out $all;
close $out;

Robert Wohlfarth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ofb.biz/pipermail/christiansource_ofb.biz/attachments/20110707/7989f535/attachment.htm>

More information about the Christiansource mailing list