Created
January 18, 2015 18:25
-
-
Save josephabrahams/a826a774ec51136a790c to your computer and use it in GitHub Desktop.
Link to public_html directory of all users
This file contains hidden or 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/sh | |
echo "Content-type: text/html\n\n" | |
echo "<table>" | |
for user in $(ls -1 /home | egrep -v 'travis|ubuntu'); do | |
echo " | |
<tr> | |
<td valign=\"top\"><img src=\"/icons/folder.gif\" alt=\"[DIR]\"></td> | |
<td><a href=\"/~${user}/\">${user}</a></td> | |
</tr>" | |
done | |
echo "</table>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment