(p3 is less important than p2, isn't it?) Hi, sorry don't remember the exact error message. And it does not hurt in any way, it's just that it will make users wonder that there is a "math error" in "filter-mfpmath"... quote: filter-mfpmath() { local orig_mfpmath new_math prune_math # save the original -mfpmath flag orig_mfpmath="`get-flag -mfpmath`" # get the value of the current -mfpmath flag new_math=" `get-flag mfpmath | tr , ' '` " # figure out which math values are to be removed prune_math="" for prune_math in "$@" ; do new_math="${new_math/ ${prune_math} / }" done new_math="`echo ${new_math:1:${#new_math}-2} | tr ' ' ,`" if [ -z "${new_math}" ] ; then # if we're removing all user specified math values are # slated for removal, then we just filter the flag filter-flags ${orig_mfpmath} else # if we only want to filter some of the user specified # math values, then we replace the current flag replace-flags ${orig_mfpmath} -mfpmath=${new_math} fi return 0 } Explanation of problem: If new_math [=" $(get-flag mfpmath | tr , ' ') "] is just composed of flags which are to be filtered, e.g. new_math=" one_flag " or new_math=" sse " and "$@" contains ( "one_flag" "sse" ), then the resulting new_math will be just a single blank, e.g. new_math=" " and will produce a message on stderr, saying sth. like new_math: expression must be positive in filter-mfpmath Though it won't hurt anywhere at all, it's ugly and might very well confuse normal users... (checked out bugzilla, found some items that did not fit, read through the postings, and time passed once more...) Would You mind to check out if sth. like the following might be used in that situation: array_separated_by() { local IFS="$1" shift echo "$*" } ... done new_math="$( array_separated_by "," $new_math )" or even much more simple ... done new_math="${new_math# }" new_math="${new_math% }" new_math="${new_math// /,}" which would be much faster, too, because no fork/exec subshells are used...? Kind regards, Dominik
thanks, fixed in cvs