I am trying to retrieve the values in a .csv file (chimefrbcat1.csv) column #4 by nesting it inside a for-loop. However when I run the script, it simply outputs the numbers 2 to 599. I am trying to retrieve the values in column 4 from row 2 to row 599. My code is the following:
#!/bin/bash
for i in {2..599..1}
do
echo -n "$i"
currentchimera=$(awk 'NR == $i {print $4}' chimefrbcat1.csv)
echo "$currentchimera"
done