Reference: http://saiyaren.iteye.com/blog/1943207 1. Shell 读取文件和写文件 for line in $(<top30000.url.utf-8.http_server_front_hphp.txt); do tmp_port=8080; for((i=0;i<=7;i++));do echo ${line/192\.168\.12\.63/192\.168\.12\.63:$tmp_port} >>top3000
文件结构 读取文件 第一种方式 public class Test { public static void main(String[] args) throws IOException { // 最好别用FileReader,容易漏读 // 如果是window系统,/需要换成\ FileInputStream in = new FileInputStream("/Users/mac/eclipse-workspace/Demo/src/Test/file.txt"); byte[]