How to use sort and uniq command in Linux