diff --git a/README.md b/README.md index 8032be5..bccf556 100644 --- a/README.md +++ b/README.md @@ -455,6 +455,7 @@ lines() { # 'read' exits with '1' when it sees EOL and # without the added test, the line isn't sent # to the loop. + lines=0 while IFS= read -r line || [ -n "$line" ]; do lines=$((lines+1)) done < "$1"