Last active
December 14, 2015 19:19
-
-
Save Asenar/5135715 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 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 "" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment