-
Notifications
You must be signed in to change notification settings - Fork 23
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
Feature Request: More unique uniqueness flag #13
Comments
Hi @StaticPH! Although this sounds reasonable, it's likely not viable because it requires storing every value in memory to emit at the end (seeing as you need to process all input to know whether there has been a duplicate or not). This is probably not something that should be added, since it's far too easy to blow up on memory for unsuspecting users. If there's some magic that might exist to allow this to work more efficiently I'm all ears, but on the face of it it just doesn't seem plausible. |
I'd be fine with just running If both of those particular method stills has the issue of memory blow up, which I suspect it would, it wouldn't be a deal-breaker for the feature to work only with "permanent" files (no command redirection or pipelines). I could probably get a similar effect by piping the output from the second run through some combination of |
As it stands, both
runiq
andruniq --invert
always include a single instance of each value that exists more than once within the inputs. There is not, however, an option to completely omit values that occur more than once.I would like to see some sort of '--no-duped' flag (the name is open for debate), probably mutually exclusive with --invert, that filters out all occurrences of data with duplicates, rather than the current default behavior of leaving a single instance.
example:
With the current behavior,
runiq fileA fileB
would produce:runiq --no-duped fileA fileB
would then produce:The text was updated successfully, but these errors were encountered: