i want to print every Nth line of a file using AWK. i tried modifying the general format :-
awk \'0 == NR % 4\' results.txt
to:-
How about this:
awk -v n="$ct" '0 == NR % n' results.txt
or a bit shorter
awk -v n="$ct" '!(NR % n)' results.txt