help-bash
[Top][All Lists]
Advanced

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

Re: How to put bash array to file


From: Greg Wooledge
Subject: Re: How to put bash array to file
Date: Wed, 15 Sep 2021 13:08:08 -0400

On Wed, Sep 15, 2021 at 05:05:34PM +0000, Budi wrote:
> How do we put bash array's content to a file faster than redirection > ?

Why would you think there's some super-secret faster thing?

printf %s\\0 "${a[@]}" > file

That's it.  That's how you do it.  (You could choose a delimiter other
than \0 if you're insane.)



reply via email to

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