For Programmers: Free Programming Magazines  


Home > Archive > AWK > March 2004 > Re: complex operation between two files









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: complex operation between two files
M.H

2004-03-19, 8:23 pm

Hi Ed,

It works great.

Many thnks.

haed98.

Ed Morton wrote:

>
>
> M.H wrote:
>
>
> <snip>
>
>
> <snip>
>
>
> <snip>
>
>
>
> Here y'go:
>
> awk 'NR == FNR { time2usr[$1] = $2; next }
> $5 ~ /logon_main.jsp|logon.do/ && $4 in time2usr {
> $3 = time2usr[$4]
> }
> { print }' fileA fileB
>
> Regards,
>
> Ed
>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com