On 22/01/2021 23.10, Léa Gris wrote: > I'd prefer a syntax based off: > > command-list > >(command-list) > command-list < <(command-list) > > But with curly braces for the no sub-shell version: > > command-list > >{ command-list;} > command-list < <{ command-list;} > > Which could be used to assign output of a command to a variable without > a sub-shell: > > mapfile -t users < <{ compgen -u; } # No sub-shell
That would be great. Of course mapfile maps lines to entries in an array, but if I want them in a single variable, perhaps this could do: { ls;}>>>variable Or even (if people prefer): mapvar variable < <{ ls;} It is otherwise very hard to get command output into a variable without a subshell. Peter