logoalt Hacker News

adolphtoday at 4:05 PM1 replyview on HN

  grep 'name = ' ms-litebox-Cargo.lock | wc -l
     238
edit:

  grep 'name = ' ms-litebox-Cargo.lock | sort -u | wc -l
     221

Replies

dizhntoday at 4:11 PM

I've always done 'sort | uniq'. Never bothered to check for the the unique flag to sort. Although 'uniq -c' is quite nice to have.

       -c, --count
              prefix lines by the number of occurrences
show 1 reply