I'm looking for a solution that should do grouping of identical mac address(device ids). I tried using sort -k 2, but I'm not confident of the result.Data Set looks like:1616.93,ac:22:0b:a6:22:c32872.32,c0:bd:d1:36:bb:493314.55,d4:0b:1a:39:19:b22854.11,18:f6:43:64:81:673540.68,18:f6:43:64:81:673856.91,ac:22:0b:a6:22:c32497.93,d4:0b:1a:39:19:b2Expected Output1616.93,ac:22:0b:a6:22:c33856.91,ac:22:0b:a6:22:c33314.55,d4:0b:1a:39:19:b22497.93,d4:0b:1a:39:19:b22872.32,c0:bd:d1:36:bb:492854.11,18:f6:43:64:81:673540.68,18:f6:43:64:81:67Follow up question: After grouping it by device ids, if I have to sort column 1 in ascending order. how should I go about that  
Group by Functionality on Mac Address
text processing;sort
sort -t, -k 2 file2854.11,18:f6:43:64:81:673540.68,18:f6:43:64:81:671616.93,ac:22:0b:a6:22:c33856.91,ac:22:0b:a6:22:c32872.32,c0:bd:d1:36:bb:492497.93,d4:0b:1a:39:19:b23314.55,d4:0b:1a:39:19:b2Just needed to use -t, as the delimiter.And file stores your unsorted data.