Skip to content

Instantly share code, notes, and snippets.

@colinrubbert
Created September 26, 2017 16:20
Show Gist options
  • Save colinrubbert/3f0acb81b9157274944e43b0075e3781 to your computer and use it in GitHub Desktop.
Save colinrubbert/3f0acb81b9157274944e43b0075e3781 to your computer and use it in GitHub Desktop.
sed regex for creating wordlists from csv
# Regex for remove everything after '.' ex: ".com", ".tw", ".co.uk"
sed 's/\.*$//' inputfile | tee outputfile
# Regex for removing everything before '.' ex: "www."
sed 's/.*\.//' inputfile | tee outpufile
# Regex for removing everything before ',' ex: "1010,"
sed 's/.*,//' inputfile | tee outpufile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment