mirror of
https://github.com/dylanaraps/pure-sh-bible
synced 2024-06-01 21:32:30 +02:00
set lines to 0 to avoid increment in number of lines
This commit is contained in:
parent
6485d201ac
commit
3b63450491
|
@ -458,6 +458,7 @@ lines() {
|
||||||
# 'read' exits with '1' when it sees EOL and
|
# 'read' exits with '1' when it sees EOL and
|
||||||
# without the added test, the line isn't sent
|
# without the added test, the line isn't sent
|
||||||
# to the loop.
|
# to the loop.
|
||||||
|
lines=0
|
||||||
while IFS= read -r line || [ -n "$line" ]; do
|
while IFS= read -r line || [ -n "$line" ]; do
|
||||||
lines=$((lines+1))
|
lines=$((lines+1))
|
||||||
done < "$1"
|
done < "$1"
|
||||||
|
|
Loading…
Reference in a new issue