in the lists directory: for i in *; do ../bin/config_list -o /tmp/list_configs/$i.txt $i; done then in the output directory: grep ^host_name *