S3.Blog

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

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

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


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




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.
hhhh (гость) • ответить
That awk one-liner is a lifesaver for parsing logs. I use something similar before I convert heic to png to organize screenshots by date.
obison (гость) • ответить
Standard sort and uniq is fine, but it gets annoying once you're scaling up. Might be useful to use this 25kg concrete bag calculator just to measure how much bloat these logs are actually adding to my drive.
maaof (гость) • ответить
Classic awk usage, though honestly I usually just pipe into sort and uniq. If you want to talk about real stats though, check out baseball brother for how they handle their data.
ooodk (гость) • ответить
The uniq -c combo is basically the only reason I can stand parsing logs without writing a whole script. Beats wasting time on anything else, though honestly I still prefer zoning out with drift game mobile when the server load gets annoying.
ooodk (гость) • ответить
Useful one-liner for log parsing, though I usually just use an AI-powered response writer to draft these pipelines when I forget the syntax. Makes cleaning up apache logs way faster than writing a whole script.
ooodk (гость) • ответить
Sort and uniq -c is standard, but if you really want to kill time while parsing logs just play some coreball. Works way better than awk for my sanity.
ooodk (гость) • ответить
Classic awk pattern, saves so much time with logs. Beats spending hours grinding in some chicken battle royale game just to get a win.

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

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

 



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