Deutsch English Français Italiano |
<veeraj$b0e5$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feeds.phibee-telecom.net!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com> Newsgroups: comp.unix.shell Subject: Re: Different variable assignments Date: Sat, 12 Oct 2024 23:56:33 +0200 Organization: A noiseless patient Spider Lines: 38 Message-ID: <veeraj$b0e5$1@dont-email.me> References: <lmt83dFsvbvU3@mid.individual.net> <lmt90sFr1idU1@mid.individual.net> <lmta1jFsvc0U1@mid.individual.net> <vecl6n$d0r$1@dont-email.me> <lmuniuF632tU1@mid.individual.net> <vedlc2$4vi6$1@dont-email.me> <vedofj$5g3v$1@dont-email.me> <lmvkisF860uU2@mid.individual.net> <veepth$ao2d$2@dont-email.me> <veeqpn$au42$1@dont-email.me> <veeqvd$ao2d$10@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 12 Oct 2024 23:56:35 +0200 (CEST) Injection-Info: dont-email.me; posting-host="2cdacf41ca5404b51bb3ae13b0955324"; logging-data="360901"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19npg4vVe0A58p4lyklctqw" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:25sIRmck3keXXK+tLQcuHDa2QfA= In-Reply-To: <veeqvd$ao2d$10@dont-email.me> Bytes: 2631 On 12.10.2024 23:50, Lawrence D'Oliveiro wrote: > 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. Exactly. (That's what I was saying.) '/dev/fd/5' acts like a file/path name (but only on systems that support /dev/fd mechanism). > 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»)”. No. (1388)$ read <(cat hello_world) ksh: read: /dev/fd/3: invalid variable name (1389)$ read < <(cat hello_world) (1390)$ echo $REPLY Hello world! (1391)$ read 0<(cat hello_world) ksh: read: /dev/fd/3: invalid variable name Janis