Q:

bash shell array output range to csv

Is there an easier way to do the below? I am reading in a large cvs file and want to only display ranges on the index per line and output back into a csv format. 
while  IFS=$',' read -r -a myArray
do
    echo ${myArray[44]},${myArray[45]},${myArray[46]},${myArray[47]},${myArray[48]},${myArray[65]},${myArray[66]},${myArray[67]}
done < $SHEET

A:

You can use the substring operator with array parameter expansion:
while IFS=, read -r -a myArray
do
    ( IFS=,; echo "${myArray[*]:44:5},${myArray[*]:65:3}" )
done

