Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Get unique fields from file

by tybalt89 (Prior)
on Jan 07, 2022 at 04:49 UTC ( #11140234=note: print w/replies, xml ) Need Help??


in reply to Re^2: Get unique fields from file
in thread Get unique fields from file

Yep. I couldn't tell if what was wanted was "unique in row", "unique in column" or "only singletons in column", so I just thought I'd toss something out there.

I do have a solution that takes practically no memory (uses external sort -u), but I'll wait to see responses to the proposed answers first.

Replies are listed 'Best First'.
Re^4: Get unique fields from file
by Marshall (Canon) on Jan 07, 2022 at 10:33 UTC
    I see that we both had the same interpretation issue...

    As far as sort -u goes, I didn't know if the OP is on Windows, Unix or other platform. There is supposed to be an undocumented sort switch on Win10: sort /UNIQ, but I didn't bother to test that. This can be done in another way in the new PowerShell, but I didn't worry about that either. I also circled back to "what the heck does unique mean?".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11140234]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2022-08-18 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?