#!/bin/sh cd /home for x in * ; do [ -x /home/$x/public_html ] && echo $x done