it seems to work your main error is to use ${found_name} instead of ${name}. also, you do not set ${group} in your example. and, not essential, but test -z before adding useless spaces. correcting that, I had it working perfectly.
h2g2:~# cat test path=/dev group=tty for name in "${path}/${group}"* do [ -z "${found_list}" ] && found_list="${name}" || found_list="${found_list} ${name}" done echo "found list: $found_list" h2g2:~# sh test found list: /dev/ttyU0 /dev/ttyU0.init /dev/ttyU0.lock /dev/ttyd0 /dev/ttyd0.init /dev/ttyd0.lock /dev/ttyp0 /dev/ttyp1 /dev/ttyp2 /dev/ttyp3 /dev/ttyp4 /dev/ttyp5 /dev/ttyp6 /dev/ttyp7 /dev/ttyv0 /dev/ttyv1 /dev/ttyv2 /dev/ttyv3 /dev/ttyv4 /dev/ttyv5 /dev/ttyv6 /dev/ttyv7 /dev/ttyv8 /dev/ttyv9 /dev/ttyva /dev/ttyvb /dev/ttyvc /dev/ttyvd /dev/ttyve /dev/ttyvf h2g2:~# Samuel Martín Moro {EPITECH.} tek4 CamTrace S.A.S (+033) 1 41 38 37 60 1 Allée de la Venelle 92150 Suresnes FRANCE "Nobody wants to say how this works. Maybe nobody knows ..." Xorg.conf(5) On Mon, Jun 21, 2010 at 1:21 PM, Aiza <aiz...@comclark.com> wrote: > for name in "${path}/${group}"*; do > found_list="${found_list} ${found_name}" > done > _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"