Skip to content

Instantly share code, notes, and snippets.

@tott
Created December 11, 2013 10:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tott/7908001 to your computer and use it in GitHub Desktop.
Get a space separated list of all hosts in an apache config so you can add them to your hosts file
#!/bin/bash
grep -E "Server(Name|Alias)" httpd.conf | sort | uniq | cut -d " " -f 6 | tr "\n" " "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment