sort based on the nth character
I have file containg data like this
3u49
3u4c
3u4d
1iy8
3wye
1ipf
2ae2
2zat
1ipe
1geg
3gvc
2rhc
Based on the first 3 characters it has to be sorted and only unique line has to be printed based on the first 3 characters.
1geg
1ipe
1iy8
2ae2
2rhc
2zat
3gvc
3u49
3wye
I tried man for sort and uniq i couldn't figure out
thanks
Last edited by kumar23kan; 11-08-2015 at 07:20 AM.
|