We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
'Uniq' Command #2
'Uniq' Command #2
Sort by
recency
|
184 Discussions
|
Please Login in order to post a comment
!/bin/bash
uniq -c | sed 's/^[ \t]*//'
uniq -c | cut -c 7-
don't echo the leading spaces
while read line; do echo $line >> file.txt done cat file.txt | uniq -c | sed -E 's/^(.{0,7})[ ]+/\1 /;s/ {2,}//'
this worked for me: uniq -c | cut -c7-
uniq -c|sed -e 's/ //g' worked for me