bug-bash
[Top][All Lists]
Advanced

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

Re: Feature Request: scanf-like parsing


From: Léa Gris
Subject: Re: Feature Request: scanf-like parsing
Date: Fri, 22 Jan 2021 17:10:22 +0100
User-agent: Telnet/1.0 [tlh] (PDP11/DEC)

Le 22/01/2021 à 16:11, pepa65 écrivait :
I still love the idea of ">>>variable" to direct output into a
variable without needing a subshell

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:

Example:

mapfile -t users < <{ compgen -u; } # No sub-shell


Implementation-wise it could be a temporary file in /tmp or /dev/shm rather-than a temporary named fifo as with < <(:).

--
Léa Gris




reply via email to

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