#!/bin/bash forwardSelect(){ for((i=1; i<=1000; i++)) do ./tool -r $RANDOM -s 0 | gawk 'BEGIN{FS=",";OFS=",";} NR>1 {print $(NF-1),$NF;}'; done } #forwardSelect > forward.csv; backwardSelect(){ for((i=1; i<=1000; i++)) do ./tool -r $RANDOM -s 1 | gawk 'BEGIN{FS=",";OFS=",";} NR>1 {print $(NF-1),$NF;}'; done } backwardSelect > backward.csv;