help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fastest way to copy a bash array to a file


From: Greg Wooledge
Subject: Re: fastest way to copy a bash array to a file
Date: Thu, 13 Jul 2023 07:03:18 -0400

On Thu, Jul 13, 2023 at 06:58:24AM -0400, Greg Wooledge wrote:
> On Thu, Jul 13, 2023 at 10:14:31AM +0700, Budi wrote:
> > How fastest, simplest way to copy or write a bash array values to a file 
> > e.g.

I forgot to mention that some of the methods of serializing an array's
data will preserve the index values, and some will not.  Of the ones
that I showed in the previous message, only "declare -p" preserves them.

You must also include "Do I want/need to preserve the indices" in your
list of self-asked questions when choosing your serialization method.
Usually the answer is "no", but sometimes it's "yes".  And only you would
know.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]