Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The wc program on chapter 6 fails when the last line of a file does not terminate with a new line character #3

Closed
pirivan opened this issue Jul 9, 2018 · 3 comments

Comments

@pirivan
Copy link

pirivan commented Jul 9, 2018

When the last line of a file does not terminate with the new line character the program fails to include that line's content into the count of number of words and characters. You can take a look at my fixes in these two commits.

https://gitlab.com/pirivan/golearn/commit/dfeb4b856fb135b292590de6ed2f403768be6a65
https://gitlab.com/pirivan/golearn/commit/2459b220e486dbf85db82f30b5d1e49523c3bfa0

@mactsouk mactsouk mentioned this issue Jul 9, 2018
@mactsouk
Copy link
Collaborator

mactsouk commented Jul 9, 2018

Made the PR in #4
Thanks!

@pirivan
Copy link
Author

pirivan commented Jul 9, 2018 via email

@techsachinkumar
Copy link
Contributor

Merged pull request

Closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants