Skip to content

Instantly share code, notes, and snippets.

@dasgoll
Created November 9, 2022 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dasgoll/306c6b9a617a5a142874b7023e46cc82 to your computer and use it in GitHub Desktop.
Save dasgoll/306c6b9a617a5a142874b7023e46cc82 to your computer and use it in GitHub Desktop.
egrep ip address from log using regex
egrep 'from ([0-9]{,3}.[0-9]{,3}.[0-9]{,3}.[0-9]{,3})' /var/log/secure -o |sed 's/from //g' | sort | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment