#!/bin/bash for file in *.txt;do echo $file done for file in *.txt;do { cat $file >>all.txt } done line=$(cat all.txt|sed -n ‘$=‘) cat all.txt >>all${line}个流.txt
合并数据+统计流数
原文:http://www.cnblogs.com/soyo/p/7350043.html