On Sun, Dec 06, 2009 at 01:06:24AM +0900, Masao Uebayashi wrote: > Could you elaborate how the old version failed on Mac OS X?
lists=$( for _list in $( echo ${OPTARG} | tr , ' ' ); do case $_list in base) echo "${nlists}" ;; x) echo "${xlists}" ;; ext) echo "${extlists}" ;; esac done ) My guess is that the parser has terminated the first '$(' on the case label 'base)' while trying to skip the unwanted case clause. Quite possibly it would all work if the $(...) were replaced by `...` (the nested one just needs a couple of \). However since the 'for' doesn't ever generate a subshell there is no need for the complication. David -- David Laight: da...@l8s.co.uk