dylanaraps / pure-sh-bible

📖 A collection of pure POSIX sh alternatives to external processes.
MIT License
6.45k stars 281 forks source link

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

Open asntech opened 4 years ago

asntech commented 4 years ago

Hi @dylanaraps,

I've fixed a bug in lines() by setting the lines variable to 0 as it was incrementing the number of lines if you call lines multiple times.

For example:

$ lines /path/to/file.txt $ 100 $ lines /path/to/file.txt $ 200