Alin Năstac wrote:
> Ryan Hill wrote:
>> NEWFEATURES=
>>
>> for f in ${FEATURES}; do
>>     if [[ ! $f == "test" ]]; then
>>         NEWFEATURES="${NEWFEATURES} $f"
>>     fi
>> done
>>
>> FEATURES="${NEWFEATURES}"
>>
>>   
> There is a simpler way to remove a word from an environment variable:
> FEATURES=" ${FEATURES}" # make sure every word is prefixed by a space
> FEATURES=${FEATURES/ test/}

Doh.  I tried ${FEATURES## test} but didn't think of substitution.

This actually solves another problem for me.  Thanks.

-- 
                  fonts / wxWindows / gcc-porting / treecleaners
  EFFD 380E 047A 4B51 D2BD  C64F 8AA8 8346 F9A4 0662 (0xF9A40662)

-- 
[EMAIL PROTECTED] mailing list

Reply via email to