for loop

Please read our rules which state:

(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.

and

(6) Do not post classroom or homework problems.

If you want lines 1,5,9,13... which is not exactly every third line, you can use sed:

yes|nl|sed 'p;N;N;N;d'

It's not a for loop, but it's a good solution if this isn't homework. :wink: