Sujet : Re: Different variable assignments
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.unix.shellDate : 12. Oct 2024, 22:50:37
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <veeqvd$ao2d$10@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Pan/0.160 (Toresk; )
On Sat, 12 Oct 2024 23:47:34 +0200, Janis Papanagnou wrote:
'<(...)' executes the command indicated by '...' and provides a file
descriptor, something like '/dev/fd/5', which (being effectively a
filename) can be redirected to the 'read' command.
It’s an actual file name. The process treats it as just another filename
argument. The fact that it encodes a file descriptor is something OS-
specific, that only code that wants to create such names (like the shell)
has to worry about.
The shell's 'read' command doesn't read from files but from stdin
It can read from any file currently open for reading.
So it's no "extra" '<' ...
Ah, I see. Instead of “< <(«cmd›)”, you could have just written
“0<(«cmd»)”.