Re: Why wouldn't "stringing" of an input parameter using an array work? ...
On Thu, Jun 08, 2023 at 06:07:28PM +0000, Albretch Mueller wrote:
> Why would:
>
> kate "file1_ps_-aux.txt" "file2_dmesg.txt" "file3_printenv.txt" &
>
> kate "${_FL1}" "${_FL2}" "${_FL3}" &
>
> work?, but stringing the file names using a loop wouldn't?
Not sure what "stringing" means here.
> I need to keep somehow declaratively the files read in by kate at
> start up, so I thought of using an array:
Yes. Use an array.
> _KSX_AR=(
> "${_FL1}"
> "${_FL2}"
> "${_FL3}"
> )
kate "${_KSX_AR[@]}" &
See also <https://mywiki.wooledge.org/BashFAQ/050> and
<https://mywiki.wooledge.org/BashFAQ/005>.
Reply to: