解析日志文件等 [英] Parsing a log file, etc

查看:81
本文介绍了解析日志文件等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须制作3个单独的功能:


function1。计算我的''logfile''中的行并在空闲时返回答案。


function2。计算某个用户在日志文件中的次数,例如johnny.killed.peter在日志文件中记录了多少次并仅返回答案


function3。显示用户''johnny.killed.peter'查看了哪些文件,并将文件名写入名为''pole3.out''的新文件中,每行一个名称,并且必须按字母顺序排列最受欢迎的一个。


3号可以是字典。


感谢所有人的帮助,你们真的在拯救我的生命!

i have to make 3 seperate functions that:

function1. Counts the lines in a my ''logfile'' and returns the answer in idle.

function2. counts how many times a certain user is in the ''logfile'' for instance how many times ''johnny.killed.peter'' has been logged in the ''logfile'' and returns only the answer

function3. shows what files the user ''johnny.killed.peter'' has looked at and writes the names of the files in a new file called ''pole3.out'' with one name per row and it has to b ein alphabetical order with the most popular one first.

number 3 can be a dictionary.

thanks for all ur help guys u are really saving my life!

推荐答案


i必须制作3个单独的函数:< snip>

function2。计算某个用户在日志文件中的次数,例如johnny.killed.peter在日志文件中记录了多少次并仅返回答案


function3。显示用户''johnny.killed.peter'查看了哪些文件,并将文件名写入名为''pole3.out''的新文件中,每行一个名称,并且必须按字母顺序排列最受欢迎的一个。


3号可以是字典。
i have to make 3 seperate functions that:<snip>
function2. counts how many times a certain user is in the ''logfile'' for instance how many times ''johnny.killed.peter'' has been logged in the ''logfile'' and returns only the answer

function3. shows what files the user ''johnny.killed.peter'' has looked at and writes the names of the files in a new file called ''pole3.out'' with one name per row and it has to b ein alphabetical order with the most popular one first.

number 3 can be a dictionary.



我们实际上需要你的日志文件样本。

We''ll actually need a sample of your log file for this.



i必须制作3个独立的功能:


function1。计算我的''logfile''中的行并在空闲时返回答案。

< snip>

感谢所有你的帮助你们真的在拯救我的生命!
i have to make 3 seperate functions that:

function1. Counts the lines in a my ''logfile'' and returns the answer in idle.
<snip>
thanks for all ur help guys u are really saving my life!

展开 | 选择 < span class =codeDivider> | Wrap | 行号


有没有人在功能2和3上找到任何东西?我已经在这几天愚弄了这件事,似乎无法做到这一点。感谢所有的帮助。


has anyone come up with anything on function 2 and 3? ive been fooling around with this for s couple days and cant seem to get it right. thanks for all the help.


展开 | 选择 | Wrap | 行号


这篇关于解析日志文件等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆