Am 29.03.2013 16:23, schrieb Pierre Gaston:
> On Fri, Mar 29, 2013 at 5:10 PM, John Kearney <dethrop...@web.de> wrote:
>> consider
>> dethrophes@dethace ~
>> $ read -ra vals -d '' <<< $'lkjlksda\n adasd\n:sdasda:'
>>
>> dethrophes@dethace ~
>> $ echo ${vals[0]}
>> lkjlksda
>>
>> I meant to update your wiki about it but I forgot.
>> I guess read uses gets not fread and that truncates the line anyway.
>>
> you miss the IFS part:
> IFS=: read -ra vals -d '' <<< $'lkjlksda\n adasd\n:sdasda:'
> echo "${vals[0]}"
>
> (IFS contains \n by default)
Ok that works, I must have somehow misunderstood the description.
Oh well thanks that makes he world a little more sane.

Reply via email to