bash:
size1=$( wc -l < file1 )
size2=$( wc -l < file2 )
i=0
while (( i < size1 )); do
cat file2
(( i += size2 ))
done | paste -d, file1 - | head -n $size1
Eu canudo para head
caso o tamanho do arquivo1 não seja um múltiplo do arquivo2
saída
61346877,212
41724134,1231
85406965,324234
59647779,213
25199749,212
86213,1231
45417131,324234
41905714,213
19415458,212
1828594,1231
56543876,324234
70603415,213
Um programa awk de 3 linhas
awk -v OFS=, '
# read the smaller file into memory
NR == FNR {size2++; file2[FNR] = $0; next}
# store the last line of the array as the zero-th element
FNR == 1 && NR > 1 {file2[0] = file2[size2]}
# print the current line of file1 and the corresponding file2 line
{print $0, file2[FNR % size2]}
' file2 file1