S3.Blog

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

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

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


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




yearbar (гость) • ответить
Почему никто не сказал мне, что год пролетает так быстро?

Январь казался вчерашним днем.
А теперь этот сайт говорит, что мы уже намного дальше продвинулись в этом году, чем я думал.
Нет, это действительно безумие.

https://percentageoftheyear.com/
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.
Kyle Lynch (гость) • ответить
It looks like you’re describing a handy one-liner for Linux to group and count matches—perfect for quickly summarizing things like Apache logs. That approach saves time when you need an instant overview instead of digging through raw output. If you’re also into practical tips and troubleshooting workflows, you might enjoy community posts that include tools and examples—some even mention papa's freezeria as a fun side note.

zarks (гость) • ответить
Awk is fine for quick stuff, but using it to parse user agents like that is just asking for a headache. You should probably spend that time checking weather radar instead of fighting with regex.

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

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

 



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