On 2005-08-24 07:58, antenneX <[EMAIL PROTECTED]> wrote:
>"antenneX" <[EMAIL PROTECTED]> wrote:
>>"Giorgos Keramidas" <[EMAIL PROTECTED]> wrote:
>>>> (envelope-from [EMAIL PROTECTED])
>>>> (envelope-from [EMAIL PROTECTED])
>>>> (envelope-from [EMAIL PROTECTED])
>>>>
>>>> All ideas appreciated....
>>>
>>> $ awk '{print $2}' tmpfile | sed -e 's/)[[:space:]]*$//' | sort | uniq
>
> Just woke up this morning and realized I needed to chop off more --
> everything except the domain.
>
> So, instead of [EMAIL PROTECTED] I need the result badguy.com
>
> How could the above awk line be expanded to chop off the username@
> portion as well?
sed(1) can do more than one substitutions in one line:
sed -e 's/)[[:space:]]*$//' -e 's/^.*@//'
or you can use as complex regular expressions as necessary to cut
specific parts of the line:
sed -e 's/[EMAIL PROTECTED]([^)]*\))[[:space:]]*$/\1/'
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"