a b c 1 2 3 % paste [file1] [file2] a 1 b 2 c 3 % paste -d' ' [file1] [file2] a 1 b 2 c 3 % paste -s [file1] a b c % cat [file1] | paste - [file2] % find . -name '*.txt' > files.txt # a.txt # b.txt # c.txt % yes ./a.out | head -`cat files.txt | wc -l` | paste -d' ' - files.txt > a.sh # ./a.out a.txt # ./a.out b.txt # ./a.out c.txt # cat files.txt | wc -l で行数 3 を、yes ./a.out | head -3 で ./a.out を3回