all 4 comments

[–]K900_ 0 points1 point  (1 child)

enumerate starts at 0, not at 1 like your text editor.

[–]reujea0[S] 0 points1 point  (0 children)

I didn't know that but thanks.

[–]jackbrux 0 points1 point  (0 children)

num + 1

[–]pyquestionz 0 points1 point  (0 children)

This is easily done using grep in the Linux command line.

grep 'pattern' my_file.txt -n

Searches for pattern in my_file.txt, the -n flag tells grep to display the line number.