meta.sh

Sign up for a GitHub account Sign in All Gists public qpfiffer / meta.sh Created 2014-05-05 — forked from nijotz/gist:1b541b07e7c5f34dc4f1 Gist Detail Revisions 3 Download Gist Clone this gist Embed this gist Link to this gist meta.sh Shell File suppressed. Click to show. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #!/bin/bash if [ -z $1 ] then echo "Getting all nginx configs" RESPONSE = $( grep server_name /etc/nginx/sites-enabled/* | sed -e 's/.*server_name //' -e 's/localhost *//' -e 's/ /\n/g' -e 's/;$//' | sed -re 's_^(.*)$_<li><a href="http://\1">\1</a></li>_' ) else echo $1 RESPONSE = $( grep server_name /etc/nginx/sites-enabled/ $1 | sed -e 's/.*server_name //' -e 's/localhost *//' -e 's/ /\n/g' -e 's/;$//' | sed -re 's_^(.*)$_<li><a href="http://\1">\1</a><...

Linked on 2014-05-05 22:53:53 | Similar Links