Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

awk : matcing timestamps, date, and manipulations colums to create a new file

Status
Not open for further replies.

fxsme

IS-IT--Management
Jul 29, 2014
2
0
0
BE
Hi,

I would like to have some help from you because i am not programmer in awk.

the first file is :

Code:

3184 2014-07-28 04:15 global.Remote-Access 10.111.8.25 81.245.6.25 tcp 3268
3035 2014-07-28 04:16 global.Remote-Access 10.111.8.12 81.245.6.25 tcp 3268


The second file is:

Code:

1 Jul 28 04:12 2014-07-28 id967254(group3)[attribute1 attribute2] Tunneling: User with IP 10.111.8.12 10 connected
1 Jul 28 04:15 2014-07-28 id920767(group2)[attribute3 attribute4 .... attribute n] Tunneling: User with IP 10.111.8.25 connected
1 Jul 28 04:16 2014-07-28 ID926072(group3)[attribute1 attribute2] Tunneling:User with IP 10.111.8.12 connected


the 3rd file will be:
if the IP address in the file 1 is equal to file 2 , and
if the time ( hh:mm ) and date (yyyy-mm-dd) and group and attribute in the file 1 are equal to file2, then displays:

Code:

3184 04:15 2014-07-28 global.Remote-Access id920767(group2)[attribute3 attribute4 .... attribute n] 10.111.8.25 81.245.6.25 tcp 3268
3035 04:16 2014-07-28 global.Remote-Access ID926072(group3)[attribute1 attribute2] 10.111.8.12 81.245.6.25 tcp 3268

Note: idXXXXX may have other many attribute in [ ]

any help will appreciated...

Rgds
FXSME
 
FXSME said:
. . .
the 3rd file will be:
if the IP address in the file 1 is equal to file 2 , and
if the time ( hh:mm ) and date (yyyy-mm-dd) and group and attribute in the file 1 are equal to file2, then displays:
There are no "group and attribute" in file 1.
[thumbsdown]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Yes you are right

Errata:

the 3rd file will be:
if the IP address in the file 1 is equal to file 2 , and
if the time ( hh:mm ) and date (yyyy-mm-dd) in the file 1 are equal to file2, then displays:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top