[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: String to array
From: |
Leonid Isaev (ifax) |
Subject: |
Re: String to array |
Date: |
Thu, 30 Sep 2021 13:04:08 +0000 |
User-agent: |
Mutt/1.13.4 (2020-02-15) |
On Thu, Sep 30, 2021 at 03:52:16PM +0300, Tapani Tarvainen wrote:
> Ideas?
Something like [1]? Still a for-loop though:
-----8<-----
array=()
while IFS= read -r -d '' -n 1 c; do
array+=( "$c" )
done < <(printf "%s" "$string")
----->8-----
[1] https://stackoverflow.com/a/40833433
HTH,
--
Leonid Isaev