Skip to content

Instantly share code, notes, and snippets.

View hamza-cskn's full-sized avatar
🎯
Focusing

Hamza Coşkun hamza-cskn

🎯
Focusing
  • Türkiye/Kocaeli
  • 12:11 (UTC +03:00)
View GitHub Profile
@hamza-cskn
hamza-cskn / logs.sh
Created February 2, 2026 12:05
Docker logs but only important ones. No fuzzy/exact duplicates.
docker logs containername | grep -ie error | sed 's/^[^ ]* //' | awk '!seen[$0]++' | awk '
function sim(a,b, i,c) {
if (length(a)!=length(b)) return 0
c=0
for (i=1;i<=length(a);i++)
if (substr(a,i,1)==substr(b,i,1)) c++
return c/length(a)
}
{
for (i in buf)