bug-bash
[Top][All Lists]
Advanced

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

Re: New Feature Request


From: Eli Schwartz
Subject: Re: New Feature Request
Date: Sun, 27 Dec 2020 12:50:15 -0500

On 12/27/20 12:38 PM, Saint Michael wrote:
Bash is very powerful for its ability to use all kinds of commands and pipe
information through them. But there is a single thing that is impossible to
achieve except using files on the hard drive or on /tmp. We need a new
declare -g (global) where a variable would have its contents changed by
subshells and keep it. I.e. all subshells may change the variable and this
will not be lost when the subshell exits. Also, a native semaphore
technology, so different code being executed in parallel would change the
variable in an orderly fashion.
I use GNU parallel extensively, basically, my entire business depends on
this technology, and now I need to use a database to pass information
between functions being executed, back to the main bash script. This is
basically ridiculous. At some point we need to turn Bash into more than a
shell, a power language. Now I do arbitrary math using embedded Python, but
the variable-passing restriction is a big roadblock.
Philip Orleans


Essentially, you want IPC. But, you do not want to use the filesystem as the communications channel for the IPC.

So, what do you propose instead, that isn't the filesystem? How do you think your proposed declare -g would work? (There is already declare -g, maybe you'd prefer declare --superglobal or something?)

--
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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