#coding=utf-8print 1#初始化文件crash_log.log with open('e:/1/crash_log.log','w')as f: f.close() def fw(self): print with open('e:/1/monkey_log.txt','r')as f1 , open('e:/1/crash_log.log','a+') as f2: #设置循环读取每一行,判断过滤 while True: line=f1.readline() if '// Mo…
1.先导入相应的jar包 2.一个小的Demo测试[实体类+测试类:保存excel的方法] Student实体类 public class Student{ private int id; private String name; private String email; private Date birth; //相应的set.get方法 还有构造器(有参.无参的) ··············· } Test测试类 public class Test{ public static List…
写法一: #!/bin/bash while read line do echo $line done < file(待读取的文件) 写法二: #!/bin/bash cat file(待读取的文件) | while read line do echo $line done 写法三: for line in `cat file(待读取的文件)` do echo $line done 说明:for逐行读和while逐行读是有区别的,如: $ cat file aaaa bbbb cccc dddd…