Re: REQUEST - bash floating point math support

2024-06-21 Thread Saint Michael
Anybody else with the knowledge to tackle this? I am not capable of even writing C code correctly. On Fri, Jun 21, 2024 at 4:22 PM Chet Ramey wrote: > > On 6/21/24 3:59 PM, alex xmb sw ratchev wrote: > > > > If floating point math support is added to bash, I would expect it to > > > be

Question that baffles AI (all of them)

2024-06-15 Thread Saint Michael
in this code: data="'1,2,3,4','5,6,7,8'" # Define the processing function process() { echo "There are $# arguments." echo "They are: $@" local job="$1" shift local a="$1" shift local b="$1" shift local remaining="$*" echo "Arg1: '$a', Arg2: '$b'" } process "$dat

Re: REQUEST - bash floating point math support

2024-06-14 Thread Saint Michael
Great idea. On Fri, Jun 14, 2024 at 3:18 AM Léa Gris wrote: > > Le 14/06/2024 à 03:41, Martin D Kealey écrivait : > > On Thu, 13 Jun 2024 at 09:05, Zachary Santer wrote: > > > >> > >> Let's say, if var is in the form of a C floating-point literal, > >> ${var@F} would expand it to the locale-depe

Re: REQUEST - bash floating point math support

2024-06-12 Thread Saint Michael
I think that we should go ahead and do it. On Wed, Jun 12, 2024, 5:06 PM Zachary Santer wrote: > On Thu, Jun 6, 2024 at 6:34 AM Léa Gris wrote: > > > > Le 06/06/2024 à 11:55, Koichi Murase écrivait : > > > > > Though, I see your point. It is inconvenient that we cannot pass the > > > results of

Re: REQUEST - bash floating point math support

2024-06-05 Thread Saint Michael
I think that we should do this in the shell. I mean. It will get done at some point, in the next decades or centuries. Why not do it now? Let's compile some C library or allow inline C On Wed, Jun 5, 2024, 2:12 PM Greg Wooledge wrote: > On Wed, Jun 05, 2024 at 01:31:20PM -0400, Saint

Re: REQUEST - bash floating point math support

2024-06-05 Thread Saint Michael
the most obvious use of floating variables would be to compare balances and to branch based on if a balance is lower than a certain value I use: t=$(python3 -c "import math;print($balance > 0)") and the if [ "$t" == "False" ];then echo "Result <= 0 [$t] Client $clname $clid Balance $balance" fi The

REQUEST

2024-06-04 Thread Saint Michael
> > It's time to add floating point variables and math to bash. It just makes so much easier to solve business problems without external calls to bc or Python. Please let's overcome the "shell complex". Let's treat bash a real language.

Re: FEATURE REQUEST : shell option to automatically terminate child processes on parent death

2023-11-11 Thread Saint Michael
I support this feature. On Sat, Nov 11, 2023, 11:29 AM Corto Beau wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -g -O2 > uname output: Linux zinc 6.6.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 08 >

Re: IFS field splitting doesn't conform with POSIX

2023-04-01 Thread Saint Michael
There is an additional problem with IFS and the command read Suppose I have variable $line with a string "a,b,c,d" IFS=',' read -r x1 <<< $line Bash will assign the whole line to x1 echo $x1 line="a,b,c,d";IFS=',' read -r x1 <<< $line;echo $x1; a,b,c,d but if I use two variables line="a,b,c,d";I

Re: Light weight support for JSON

2022-08-28 Thread Saint Michael
He has a point, though. To have some of the functionality of jq inside Bash may be very useful. If he can supply a patch, why not? Philip Orleans On Sun, Aug 28, 2022, 3:22 PM John Passaro wrote: > interfacing with an external tool absolutely seems like the correct answer > to me. a fact worth m

Re: Revisiting Error handling (errexit)

2022-07-04 Thread Saint Michael
Sounds great to me. I also use Bash for mission-critical processes. Philip On Mon, Jul 4, 2022 at 8:22 AM Yair Lenga wrote: > > Hi, > > In my projects, I'm using bash to manage large scale jobs. Works very well, > especially, when access to servers is limited to ssh. One annoying issue is > the e

Re: Feature Request: scanf-like parsing

2021-01-22 Thread Saint Michael
I vote for this new feature. On Fri, Jan 22, 2021 at 9:16 AM Chet Ramey wrote: > On 1/22/21 12:29 AM, William Park wrote: > > > But, if data are buried in a mess, then it's very labour-intensive to > > dig them out. It might be useful to have scanf()-like feature, where > > stdin or string are

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

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

2020-12-27 Thread Saint Michael
-level developer. My days coding assembler are long gone. Philip Orleans Reference: https://tldp.org/LDP/tlk/ipc/ipc.html On Sun, Dec 27, 2020 at 12:50 PM Eli Schwartz wrote: > On 12/27/20 12:38 PM, Saint Michael wrote: > > Bash is very powerful for its ability to use all

New Feature Request

2020-12-27 Thread Saint Michael
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 subs

Request to the mailing list

2020-12-27 Thread Saint Michael
I want to suggest a new feature, that may be obvious at this point. How do I do this? Philip Orleans

Re: Question

2017-09-11 Thread Saint Michael
can generate solutions and also protect our intellectual property. I am not smart enough to write it, but somebody will. Yours Federico On Mon, Sep 11, 2017 at 2:54 PM, Bob Proulx wrote: > Saint Michael wrote: > > Dear Maintainer > > Note that I am not the maintainer. &

Fwd: Question

2017-09-05 Thread Saint Michael
Dear Maintainer Is there a commercial or free software that can take a Bash script and transparently turn it into a C executable, provided the machines where it runs has any of the external commands like awk, etc? Something like a Java virtual machine, for Shell. I think this language is powerful