Sort by

recency

|

185 Discussions

|

  • + 0 comments

    Two ways using uniq,tr, cut command

    uniq -c | tr -s '[:space:]' | cut -d ' ' -f2-
    

    uniq -c | cut -c 7-

  • + 0 comments

    !/bin/bash

    uniq -c | sed 's/^[ \t]*//'

  • + 0 comments

    uniq -c | cut -c 7-

    don't echo the leading spaces

  • + 0 comments

    while read line; do echo $line >> file.txt done cat file.txt | uniq -c | sed -E 's/^(.{0,7})[ ]+/\1 /;s/ {2,}//'

  • [deleted]
    + 0 comments

    this worked for me: uniq -c | cut -c7-