学生需要Linux帮助!
我有一个包含许多处理过的数据的文件,下面是一个示例:

    morp2010_001flinnR.OFDATE.stacov
    morp2010_001flinnR.OFDATE.TDP
    morp2010_002flinnR.OFDATE.stacov
    morp2010_002flinnR.OFDATE.TDP
    morp2010_003flinnR.OFDATE.stacov
    morp2010_003flinnR.OFDATE.TDP
    morp2010_004flinnR.OFDATE.stacov
    morp2010_004flinnR.OFDATE.TDP

.....etc

what I am looking to do is to use a shortcut to copy the files that end in TDP and put these into a seperate file, does anyone know how I can do this??

I am using "cat" to join all my TDP files to a seperate file, but instead of typing out:

cat morp2010_001flinnR.OFDATE.TDP morp2010_002flinnR.OFDATE.TDP... > TDP FILE

我想做点什么
cat morp2010_(001-XXX).OFDATE.TDP > TDP FILE

有人能帮忙吗!?!
谢谢

最佳答案

for i in `seq -w 1 729` ; do cat morp2010_${i}.OFDATE.TDP >> TDP_FILE ; done

运行seq -w 1 20以了解seq的功能。为729选择文件序列中的最大值。:)

关于linux - Linux-复制大量带有标签升序但与其他标签混合在一起的文件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5232540/

10-11 18:45