Skip to content

Instantly share code, notes, and snippets.

@gdemir
Last active May 10, 2022 09:47
Show Gist options
  • Save gdemir/43f0ea0a806cfdaf8665a52b2882e8aa to your computer and use it in GitHub Desktop.
Save gdemir/43f0ea0a806cfdaf8665a52b2882e8aa to your computer and use it in GitHub Desktop.
Dosya İçerisindeki Tekil(tekrar etmeyen) IP'lerin Sayılarını Gösterme
#! /bin/bash
log_filename=$1
grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+" $log_filename | sort -u | wc -l
@gdemir
Copy link
Author

gdemir commented May 10, 2022

bash unique_ip_count_on_file.sh production_2022-05-10.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment