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

read fails on empty lines #705

Closed
andychu opened this issue Apr 14, 2020 · 0 comments
Closed

read fails on empty lines #705

andychu opened this issue Apr 14, 2020 · 0 comments

Comments

@andychu
Copy link
Contributor

andychu commented Apr 14, 2020

From #653 (opening this issue for bookkeeping)

This is serious. The widely-used idiom while read -r line; do ... done cannot process files that have empty lines.

$ bash -c 'echo | read; echo $?'
0
$ osh -c 'echo | read; echo $?'
1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant