#/usr/bin/tcsh -w

set NUMLINES = ` wc sample_basins.txt | awk '{print $1}' `
set i = 1

while ( $i <= $NUMLINES ) 
 set ID = `awk '{if(NR=='$i') print $2}' sample_basins.txt `
 set XPOS = `awk '{if(NR=='$i') print $3}' sample_basins.txt `
 set YPOS = `awk '{if(NR=='$i') print $4}' sample_basins.txt `
 echo $ID $XPOS $YPOS
 set i = ` echo "$i + 1 " | bc `
end