我有多个这样的文件: BOB_1.brother_bob12.txt..BOB_35.brother_bob12.txt 如何按照{1..36}顺序连接这些文件,并在每行的末尾添加文件名?;i++)); do echo -n "BOB_${i}.brother_bob12.txt "; done) # joins in order but no filename at the end
我编写了以下代码来处理多个文件中的每一行,并在行尾添加文件名:
for i in $(cat all_output_file.txt);do cat $i|sed 's/:/ /g'|sed 's/-/cn=/ /g'| awk 'BEGIN{OFS="\t"}{print $1,$2,$3,$6,FILENAME}'>>inp