To paste many files, whose names are incremental numbers:
paste {1..8}| column -s $'\t' -t
- What if your files wasn't named by number, but only words?
- It can be up to ten files, what should I do?
In addition, you have a list of files that contains all the files you want.
So far, my approach is:
mkdir paste
j=0; while read i; do let j+=1; cp $i/ paste/$j; done<list;
cd paste; paste {1..8}| column -s $'\t' -t
I have no problem with this approach, I just want to ask if there is any shorter one.
Actually my files have the same name, just on different locations, for instance 1MUI/PQR/A/sum, 2QHK/PQR/A/sum, 2RKF/PQR/A/sum. The paste command should be paste {list}/PQR/A/sum. The list file is:
1MUI
2QHK
2RKF
...