Sujet : Re: Subjective "valuations" are all we have (Was: coprocs - again (Was: Different variable assignments))
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shellDate : 26. Oct 2024, 15:20:34
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vfitrk$3ohc8$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 25.10.2024 14:54, Kenny McCormack wrote:
P.S. To answer one question, "coproc" *is* a shell keyword in bash:
Yes. - I just asked that to get a better feeling for the implications,
e.g. for the redirection question that arose in Bash context. (Lem had
addressed that question in his post; a possible reason why redirection
is explicitly listed in the Bash man page with 'coproc'.)
[...]
I think you will find that |& is also a keyword (in ksh),
In Ksh it's not that relevant "what it is" because it's (syntactically
more obvious) a command separation like ';', <NL>, or '&'.
It's documented, and you can also see that if you write (for example)
bc |& exec 3<&p 4>&p
instead of having the two commands each in an own line.
In Ksh we write 'cmd &|' for a co-process as we write 'cmd &' for a
background process.[*]
although I could
not get "type" (or anything similar) to confirm that suspicion.
I don't think it makes sense to use the 'type' command on syntactic
symbols like ';', '&', '|&', '|', etc. - It's anyway documented in the
man page:
A list is a sequence of one or more pipelines separated by ;, &, ⎪&,
&&, or ⎪⎪, and optionally terminated by ;, &, or ⎪&.
Janis