sed/awk, instead of Perl
Barry Byrne
barry.byrne at wbtsystems.com
Thu Aug 21 12:53:06 UTC 2008
Quoting "Steve Bertrand" <steve at ibctech.ca>:
few passes over a few files.
>
> To put it plainly, can anyone, if it's possible, provide a single
> line sed/awk pipeline that can:
>
> - read email addresses from a file in the format:
>
> user.name TAB domain.tld
>
> - convert it to:
>
> user_name at example.com
>
> - write it back to either a new file, the original file, or to STDOUT
>
> Regards,
cat file.txt | ( while read user domain; do echo "$user@$domain"; done )
- barry
More information about the freebsd-questions
mailing list