Skip to content

Instantly share code, notes, and snippets.

@Asenar Asenar/
Last active Dec 14, 2015

What would you like to do?
# get all, separated by space or kind of
tout=$(grep "<virtualhost\|servername" /usr/local/apache/conf/httpd.conf -i \
| sed "s#<VirtualHost\(.*\):[0-9]*>#\1#" \
| sed "s#.*ServerName \(.*\)#\1#" \
count = 0;
# newline one / 2
for i in $tout; do
printf "$i"
if [ $count == 1 ]; then
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.