Apr 21, 2004 #1 630111 MIS Oct 30, 2001 127 US I have a text file with the following: Andy Bill Brian Jessica Michelle Judy Julie Larry Luke Bill Brian I want to extract only one occurance of each name, no matter how many times it appears in the file. How would I go about this? Thanks! 630111
I have a text file with the following: Andy Bill Brian Jessica Michelle Judy Julie Larry Luke Bill Brian I want to extract only one occurance of each name, no matter how many times it appears in the file. How would I go about this? Thanks! 630111
Apr 21, 2004 1 #2 vgersh99 Programmer Jul 27, 2000 2,146 US sort -u myFile.txt vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
sort -u myFile.txt vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+
Apr 21, 2004 1 #3 PHV MIS Nov 8, 2002 53,708 FR Try something like this: sort -u /path/to/inputfile If you want to keep original order: awk '++a[$0]==1' /path/to/inputfile Hope This Help, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 Upvote 0 Downvote
Try something like this: sort -u /path/to/inputfile If you want to keep original order: awk '++a[$0]==1' /path/to/inputfile Hope This Help, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884