You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See that PR #11 was an incomplete solution to the problem that piping output from printf to grep (printf ... | grep ...) is subject to printf: write error: Broken pipe failure in certain cases.
It seems that if grep finds the matching tag close to a buffer boundary before printf is done writing its output, it will fail. This condition would be hard to predict or prevent when using a pipe.
grep should probably not be used with a pipe, but should read from a file on its own. See this StackOverflow question for more discussion.
Or, maybe it would be better to avoid grep and just implement search loop in bash with plain string matching, which could also fix #6.
The text was updated successfully, but these errors were encountered:
See that PR #11 was an incomplete solution to the problem that piping output from printf to grep (
printf ... | grep ...
) is subject toprintf: write error: Broken pipe
failure in certain cases.It seems that if grep finds the matching tag close to a buffer boundary before
printf
is done writing its output, it will fail. This condition would be hard to predict or prevent when using a pipe.grep
should probably not be used with a pipe, but should read from a file on its own. See this StackOverflow question for more discussion.Or, maybe it would be better to avoid
grep
and just implement search loop in bash with plain string matching, which could also fix #6.The text was updated successfully, but these errors were encountered: