Использование bash:
#!/bin/bash
paste PreRefFile.csv Txlog.csv | while IFS=$'\t' read a b; do
i=29
while [[ $i -le 189 ]]; do
printf "$(cut -d, -f$i<<<"$a")\t$(cut -d, -f$i<<<"$b")\n"
i=$((i+1))
done
done
Используя python:
#!/usr/bin/env python2
import csv, itertools
with open('PreRefFile.csv') as a, open('PreRefFile.csv') as b:
for i, j in itertools.izip_longest(csv.reader(a), csv.reader(b)):
check = 28
while check <= 188:
print i[check] + '\t' + j[check]
check += 1