2 deleted 120 characters in body
source | link

How I understand output_A.csv is a list of files to process and each of it have text file with linesAccording to describe a portions. Soformat files explanation

for I in $(cat output_A.csv) 
do
    awk -F',' 'FNR==NR{
               for(i=($1*100),i<=($2*100);i++)
                   portion=FNR
               next }
           { print portion[FNR], $0 }
          ' ${I%.*}output_A.txt $Ioutput_A.csv >> $Ioutput_A.result
done

How I understand output_A.csv is a list of files to process and each of it have text file with lines to describe a portions. So

for I in $(cat output_A.csv) 
do
    awk 'FNR==NR{
             for(i=($1*100),i<=($2*100);i++)
                 portion=FNR
             next}
         { print portion[FNR], $0 }' ${I%.*}.txt $I >> $I.result
done

According to format files explanation

awk -F',' 'FNR==NR{
               for(i=($1*100),i<=($2*100);i++)
                   portion=FNR
               next }
           { print portion[FNR], $0 }
          ' output_A.txt output_A.csv >> output_A.result
1
source | link

How I understand output_A.csv is a list of files to process and each of it have text file with lines to describe a portions. So

for I in $(cat output_A.csv) 
do
    awk 'FNR==NR{
             for(i=($1*100),i<=($2*100);i++)
                 portion=FNR
             next}
         { print portion[FNR], $0 }' ${I%.*}.txt $I >> $I.result
done