Date: Thu, 21 Aug 2008 15:51:41 -0700 From: Walt Pawley <walt@wump.org> To: Steve Bertrand <steve@ibctech.ca>, freebsd-questions@freebsd.org Subject: Re: sed/awk, instead of Perl Message-ID: <p06240802c4d3a17ebdd7@[10.0.0.10]>
next in thread | raw e-mail | index | archive | help
At 3:49 PM -0700 8/21/08, Walt Pawley wrote:
>At 8:46 AM -0400 8/21/08, Steve Bertrand wrote:
>
>>- read email addresses from a file in the format:
>>
>>user.name TAB domain.tld
>>
>>- convert it to:
>>
>>user_name@example.com
>>
>>- write it back to either a new file, the original file, or to STDOUT
>
>I'm curious why Perl isn't a decent choice. I think I'd do something like
>
>perl -pe 's/(.*?)\.(.*)\t.*/$1_$2@example.com/' input_file > output_file
Which is also wrong. It gets a bit closer to Steve's desires I
suspect if one adds the appropriate backslash ...
perl -pe 's/(.*?)\.(.*)\t.*/$1_$2@\example.com/' input_file > output_file
Sorry...
--
Walter M. Pawley <walt@wump.org>
Wump Research & Company
676 River Bend Road, Roseburg, OR 97470
541-672-8975
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p06240802c4d3a17ebdd7>
