- 論壇徽章:
- 1
|
回復(fù) 6# q1208c
比如有一個test.log文件,一共四列,分別是時間戳,源IP,用戶名,目的IP:
1405323925.0 10.6.99.163 test1 10.203.44.5
1405323926.0 10.6.99.163 test1 10.203.44.5
1405323941.0 10.6.99.163 test1 210.75.65.219
1405323942.0 10.6.99.163 test1 210.75.65.219
1405323955.0 10.6.99.163 test1 www.baidu.com
1405323987.0 10.6.99.163 test1 10.203.44.5
現(xiàn)在想把log文件轉(zhuǎn)換成tmp文件,tmp文件格式:version, source server IP, date time, status code, source IP, destination IP, protocol, fullurl, port, category number, filetype, bytesent, byteReceived,duration, keyword, user path,一共有這么多列,紅色的列需要log文件中的數(shù)據(jù)填充,其他列都填0,這樣可以了嗎? |
|