Hi Guys...
I am newbie to awk and would like a solution to probably one of the simple practical questions.
I have a test file that goes as:
1,2,3,4,5,6
7,2,3,8,7,6
9,3,5,6,7,3
8,3,1,1,1,1
4,4,2,2,2,2
I would like to know how AWK can get me the distinct values say for eg: on col2 and figure out that the distinct values are only 2,3,4.
I need to check my actual realtime medical file with the distinct service dates from around a relatively big 200,000 records.
And one more question is...how can I use awk to print out records which dont meet a specific criteria...like...
Eg: I want to see only those records where Distinct Col2 values are less than 10 and see the actual distinct values to figure out why they are < 10
I know I can always go for some fancy ETLs to achieve complex requirements(ofcoz this requirement is not complex anyway) and play around with the data but I wanna use the power of awk/sed to accomplish the tasks.
Help is highly appreciated.
Thank you very much
-Anduzzi