Nico Schottelius wrote on 02/22/2014 06:52 AM:
>>   __block "$__object_name" \
>>      --file "$file" \
>>      --prefix "#cdist:$__object_name" \
>>      --suffix "#/cdist:$__object_name" \
>> -   --state "$state" \
>> -   --text -
>> +   --state 'absent' \
>> +   --text - << DONE
>> +remove legacy block
>> +DONE
>> +
>> +_cksum() {
>> +   echo "$1" | cksum | cut -d' ' -f 1
>> +}
>> +
>> +# Add each key
>> +IFS=$'\n'
>> +for key in $(cat "$__object/parameter/key"); do
>
> A while read key; do ...; done < "$__object/parameter/key" is probably a little bit more beautiful / easier to read (no strong feelings though)
>

while read is evil if you use a type inside the loop