Skip to content

Instantly share code, notes, and snippets.

@eramm
Created July 24, 2022 16:25
Show Gist options
  • Save eramm/29a245a7ad116b5b1688fcac06192a2f to your computer and use it in GitHub Desktop.
Save eramm/29a245a7ad116b5b1688fcac06192a2f to your computer and use it in GitHub Desktop.
use grep to extract a FQDN from a file

grep -oiE '([a-zA-Z0-9][a-zA-Z0-9-]{1,61}\.){1,}(\.?[a-zA-Z]{2,}){1,}'

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