Sort 47 Discussions, By:
Please Login in order to post a comment
uniq -ic|cut -c7-
uniq -ci | sed 's/^[ \t]*//'
THIS IS WORK TO ME..
uniq -ic | cut -b7-
uniq -c puts 6 spaces infront of output, but do not use cut -c7- with it to clean the output as these spaces are reserved for the count of lines. If the count exceeds 9 -c7- would only give unit place of the count. use sed 's/^[[:space:]]*//g' its more robust
uniq -i -c | tr -s " " | cut -c2-