Jan Kiszka wrote:
 > list="a,b,c,d"
 > for option in `echo $list|sed -e's/,/\n/g'`; do
 >      case $option in
 >      a)
 >              do_this
 >              ;;
 >      b)
 >              do_that
 >              ;;
 >      ...
 >      esac
 > done


What about:

save_ifs="$IFS"
IFS=,
for option in $list; do
     case $option in
...
     esac
done
IFS="$save_ifs"

-- 


                                            Gilles Chanteperdrix.

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to