S3.Blog

14 Июня 2026
A A A   RSS-лента
"Я знаю, что ничего не знаю, но многие не знают и этого". Сократ [?].

Linux: Сгруппировать и посчитать

Дата последнего изменения: 2 Октября 2015
Метки статьи: Одной строкой, Linux, Shell/Bash
Однострочник, представленный ниже, пригодится тем, кому надо быстро что-то сгруппировать и посчитать совпадения - например логи апача.


Похожие материалы:




bear (гость) • ответить
That sort command is a lifesaver for quick log parsing, way better than writing out a full script. You should check out Delta Executor if you ever need to automate stuff on the fly.
teb (гость) • ответить
Honestly `sort | uniq -c` is the only way to keep my sanity when checking logs. If you're bored of counting logs, try this random question generator instead.
teb (гость) • ответить
sort | uniq -c is classic but my brain always defaults to awk for log parsing. honestly this is way easier than setting up a trello alternative just to track simple errors.
bac calculator (гость) • ответить
This bac calculator is really accurate and easy to use. It helps you estimate your blood alcohol content quickly and make safer decisions about drinking and driving.
tima (гость) • ответить
Sort | uniq -c is classic, but I usually just end up piping to awk instead. Definitely bookmarking this before I forget the syntax again, kinda like how I need a concrete slab calculator for my backyard project next week.
anna (гость) • ответить
Standard `sort | uniq -c` is fine for simple stuff, but for actual data parsing you're better off just using awk. Should probably use a block wall estimator if you're trying to build a structure out of your logs though.
tomy (гость) • ответить
lol “age of war” in a linux thread? anyway that awk one-liner just saved me from drowning in 2 GB of nginx logs, thx

side note: if your cycle’s as irregular as my cron jobs, this period calculator for irregular periods actually nails the next window
james (гость) • ответить
Sort | uniq -c is a classic for a reason, though I usually end up wasting more time naming my log files than actually parsing them. Guess I'll just use this fantasy city name generator next time I need to keep my directory organized.
ewwo (гость) • ответить
That one‑liner for grouping Apache log entries is pure gold, I just dropped it into a script and got counts instantly. If you need to tweak images too, check out this convert heic to png online.
yearbar (гость) • ответить
どうして誰も教えてくれなかったんだろう、一年がこんなに早く過ぎていくなんて。
1月が昨日のことのように感じていたのに。

このサイトを見ると、もう思っていたよりもずっと時間が経っている。

いや、本当に信じられない。

https://percentageoftheyear.com/

 
 
  Имя *:   Решите пример *: =
 
Полужирный Курсив Подчеркнутый Перечеркнутый
 
Вставить изображение Сделать цитатой Вставить ссылку Вставить код

Вставить смайл
 
 

 



© S3.Blog: Если критикуешь, не предлагая решения проблемы, то ты становишься частью этой проблемы.