文件处理脚本 #!/bin/bash a=cat log_by_uin_pf_active.txt|awk '{print $1}' b=cat active_code_data_pf_active.txt|awk '{print $1}' cat $b | while read lineb do cat $a | while read linea do if [ $lineb -eq $linea ] then echo $lineb >> abc.txt fi done done