help-bash
[Top][All Lists]
Advanced

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

Re: spaces


From: Greg Wooledge
Subject: Re: spaces
Date: Wed, 26 Jan 2022 07:47:36 -0500

On Wed, Jan 26, 2022 at 11:08:39AM +0100, Andreas Kusalananda Kähäri wrote:
> yad_general_options=(
> --title="Whatever ** ** ** goes here"
> --sticky
> --center
> --icon=icon
> )
> 
> yad_progress_options=(
> --progress
> --pulsate
> )
> 
> yad "${yad_general_options[@]}" "${yad_progress_options[@]}" --text="the nice 
> text"
> 
> 
> In short, don't ever demote a list of separate strings into a single
> string when you can store them as separate strings in an array.  Note
> that the quoting of the array expansion is crucial.
> 
> Greg will likely have something about in his FAQ, and there is also
> numerous examples of this on the Unix & Linux Stackexchange site, and in
> the mailing list archive of this mailing list.
> 
> https://mywiki.wooledge.org/BashGuide/Arrays
> https://unix.stackexchange.com/questions/459367/using-shell-variables-for-command-options

https://mywiki.wooledge.org/BashFAQ/050



reply via email to

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