here is my program:
for ((i=1;i<=300;i++)); do
awk 'NR==$i{print}' file.dat > fileB.dat
done
the file.dat contains 300 lines that I want to save in different files,
but the NR==$i doesn't work, nothing is printed.
I don't see what is wrong. Thank you