Re: New Feature Request

2021-01-04 Thread Greg Wooledge
On Mon, Jan 04, 2021 at 10:44:40AM -0500, Saint Michael wrote: > can you point me to your FAQ? https://mywiki.wooledge.org/BashFAQ/045

Re: New Feature Request

2021-01-04 Thread Saint Michael
can you point me to your FAQ? On Mon, Jan 4, 2021 at 8:39 AM Greg Wooledge wrote: > On Mon, Jan 04, 2021 at 08:26:59AM -0500, Saint Michael wrote: > > In this case, how do I quickly increase the number stored in "foo"? > > the file has 1 as content, and I have a new value to add to it > quic

Re: New Feature Request

2021-01-04 Thread Léa Gris
Le 04/01/2021 à 14:14, Greg Wooledge écrivait : It should be noted that $( var=$(ending the last line because it exactly a sub-shell shot syntax for var=$(cat file). Sub-shell $(commands list) output is always trimmed. -- Léa Gris

Re: New Feature Request

2021-01-04 Thread Greg Wooledge
On Mon, Jan 04, 2021 at 08:26:59AM -0500, Saint Michael wrote: > In this case, how do I quickly increase the number stored in "foo"? > the file has 1 as content, and I have a new value to add to it quickly. > Is there an atomic way to read,add, write a value to "foo"? Nope! It's almost like b

Re: New Feature Request

2021-01-04 Thread Saint Michael
In this case, how do I quickly increase the number stored in "foo"? the file has 1 as content, and I have a new value to add to it quickly. Is there an atomic way to read,add, write a value to "foo"? On Mon, Jan 4, 2021 at 8:15 AM Greg Wooledge wrote: > On Fri, Jan 01, 2021 at 10:02:26PM +0

Re: New Feature Request

2021-01-04 Thread Greg Wooledge
On Fri, Jan 01, 2021 at 10:02:26PM +0100, Ángel wrote: > Yes. In fact, you can already do that using an interface exactly > identical to file operations: > > # Store a string in shared memory with key 'foo' > echo "Hello world" > foo > > # Read value of key foo > var="$( > > You only need to us

Re: New Feature Request

2021-01-01 Thread Ángel
On 2020-12-27 at 13:30 -0500, Saint Michael wrote: > Yes, superglobal is great. > Example, from the manual: > " Shared Memory > Shared memory allows one or more processes to communicate via memory > that appears in all of their virtual address spaces. The pages of the > virtual memory is referenced

Re: New Feature Request

2020-12-28 Thread felix
I agree: python seem to be more apropriated language for complex operation. Anyway, bash already offer a lot of features (like `coproc` and `read -t 0`) usefull for IPC. I wrote a little ``multiping`` bash script, as multithread demo, running many parallels ping, reading all outputs and merging t

Re: New Feature Request

2020-12-27 Thread Chet Ramey
On 12/27/20 1:30 PM, Saint Michael wrote: We could allow only strings or more complex objects, but using bash-language only, an internal mechanism, and also we need to define a semaphore. Is it doable? Of course it's doable; all that takes is requirements, definition, and implementation. The

Re: New Feature Request

2020-12-27 Thread Léa Gris
On 27/12/2020 at 19:30, Saint Michael wrote: Yes, superglobal is great. Example, from the manual: " Shared Memory Shared memory allows one or more processes to communicate via memory that appears in all of their virtual address spaces. The pages of the virtual memory is referenced by page table e

Re: New Feature Request

2020-12-27 Thread Saint Michael
Yes, superglobal is great. Example, from the manual: " Shared Memory Shared memory allows one or more processes to communicate via memory that appears in all of their virtual address spaces. The pages of the virtual memory is referenced by page table entries in each of the sharing processes' page t

Re: New Feature Request

2020-12-27 Thread Eli Schwartz
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 var