- 論壇徽章:
- 0
|
本帖最后由 xmi 于 2010-10-11 17:47 編輯
有一個(gè)folder內(nèi)有很多txt檔, 請(qǐng)問如何快速地把相關(guān)的concat起來, 現(xiàn)在我只能手動(dòng)做如下....
% ls *.txt > listmaster
% cat listmaster
MAA-eqp.txt
MAA-loc.txt
MBB-eqp.txt
MBB-loc.txt
MCC-eqp.txt
MCC-loc.txt
MDD-eqp.txt
MDD-loc.txt
.......
%
%cat MAA-eqp.txt MBB-eqp.txt MCC-eqp.txt MDD-eqp.txt >equipment.txt
%cat MAA-loc.txt MBB-loc.txt MCC-loc.txt MDD-loc.txt >location.txt
謝謝各位.
補(bǔ)充:
我說不清楚, 我想快速地把 /operator/*-eqp.txt 檔 自動(dòng)cat到一個(gè)equipment.txt 檔, 把 /operator/*-loc.txt 檔 自動(dòng)cat到一個(gè)location.txt 檔. |
|