[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: read into array Segfaults
From: |
Chet Ramey |
Subject: |
Re: read into array Segfaults |
Date: |
Tue, 21 Jun 2011 10:31:52 -0400 |
> I did a stupid thing. Tried to read into an array--which is indexed--but
> the variable is already an associative array.
>
> declare -A foo
> read -a foo <<<bar
>
> The above should error instead of Segfault, yes?
Yes. It certainly shouldn't crash the shell. Try the attached patch and
let me know that it works for you. Thanks for the report.
Chet
read-assoc-array.patch
Description: Text document
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/