[PLUG] Okay after awk I need....
Steve D...
blitters at gmail.com
Fri May 6 23:09:39 UTC 2005
On 5/6/05, techmage <techmage at aracnet.com> wrote:
> Here's what I'm doing:
>
> I'm taking a line separated list of Usernames and domain names and
> removing the usernames(don't need them)
>
> then I need to remove all the sub domains without removing the master
> domain and extension.
>
> WHAT I can do so far:
>
> I can gawk -F@ '{print $2}' text.doc >> domain.doc
>
> I was going to use uniq -u at this point, but it's not smart enough to
> differentiate between sub-domains(or I'm not smart enough to figure out
> the proper syntax)
>
> Anyone feel like helping me or, having done this before, parcel thy
> wisdom in my general direction.
>
> It's worth a beer and a copy of my Chili Verde recipe.
I don't use AWK any more. I had a tragic AWK experience in my early
Unix career. How about in shell script?
cat names.txt | sed -e "s/^.*@//" | tee all.txt | sed -e
"s/\(.*\)\.\(.*\)\.\(.*$\)/\2\.\3/" > domain.txt
Steve D...
More information about the PLUG
mailing list