本文介绍了解析日志文件等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我必须制作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 answerfunction3. 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!推荐答案 我们实际上需要你的日志文件样本。We''ll actually need a sample of your log file for this. 展开 | 选择 | Wrap | 行号 展开 | 选择 | Wrap | 行号 这篇关于解析日志文件等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!