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

Don't output trailing delimiter if the input doesn't contain one #14

Closed
kkysen opened this issue Mar 29, 2020 · 1 comment
Closed

Don't output trailing delimiter if the input doesn't contain one #14

kkysen opened this issue Mar 29, 2020 · 1 comment

Comments

@kkysen
Copy link

kkysen commented Mar 29, 2020

When I run printf "1" | huniq -d ",", it prints 1,. When the input doesn't even contain the delimiter, I'd expect huniq to not change the input. But when the input is something like printf "1," | huniq -d ",", then printing 1, makes sense. I don't imagine it'd be that hard to fix this, but it would be really useful. A flag like --no-trailing-delimiter would also work as well.

Freaky added a commit to Freaky/huniq that referenced this issue Oct 17, 2020
This replaces the custom split_read_zerocopy with bstr's own
minimally-copying record reader, which simplifies the code somewhat
without sacrificing performance in any of my measurements (98% - 115%
observed performance against baseline)

This also removes the sysconf dependency, which caused a compile error
here on FreeBSD.

This also adds a --no-trailing-delimiter flag requested in koraa#14, since
this code needed to be moved anyway.
koraa pushed a commit that referenced this issue Oct 27, 2020
This replaces the custom split_read_zerocopy with bstr's own
minimally-copying record reader, which simplifies the code somewhat
without sacrificing performance in any of my measurements (98% - 115%
observed performance against baseline)

This also removes the sysconf dependency, which caused a compile error
here on FreeBSD.

This also adds a --no-trailing-delimiter flag requested in #14, since
this code needed to be moved anyway.
@koraa
Copy link
Owner

koraa commented Jul 12, 2022

Fixed

@koraa koraa closed this as completed Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants