Darren Reed wrote:
> Peter Memishian wrote:
>>  > Please explain why using a whitespace character such as tab as the
>>  > delimiter is unworkable.
>>
>> Because most shells will consolidate multiple consecutive whitespace
>> fields into a single field.  Blank fields become unworkable.
>>
>>  > My definition of parsable input means I can write a script like
>>  > this in sh:
>>  >  > dladm -o state,over | while read a b; do
>>  >     echo "a=$a,b=$b"
>>  > done
>>
>> That works, just set IFS=|
>>   
> 
> Yes, and maybe you'd like to provide a complete example so that
> it can be compared with the simplicity of what I presented above.
> 
> Darren
> 

Having to set IFS=| may make the example marginally more complex, but 
it's unavoidable. A whitespace delimiter simply doesn't allow you to 
deal with blank fields, and doing so is a key requirement.

I applaud your desire to make things as simple as possible, but not simpler.

        Scott


Reply via email to