Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

set lines to 0 to avoid increment in number of lines #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,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"
Expand Down