#!/bin/bash # ls /srv/git -I 'git-shell-commands' # one above misses repos like '.dotfiles', let's do it by hand for f in $(ls /srv/git -a); do if [[ $f == *.git ]]; then echo $f fi done