My toy program to count lines in a file uses this expression
which returns a number that in general differs from the result of ‘wc -l’. For example
echo -en "line1\nline2" > example.txt
My program counts 2 lines, wc counts 1. Is this expected?