Re: How come math/arithmetic cannot work by set -x

2022-08-13 Thread Chet Ramey
On 8/12/22 7:27 PM, Budi wrote: How come math/arithmetic ((i=k+l)) cannot make use of set -x If you're talking about what I think you are, because that's not how `set -x' works. It's the same reason that k=2+3 echo $(( $k*5 )) echo $(( k*5 )) produces two different numbers. -- ``The lyf so

Re: How come math/arithmetic cannot work by set -x

2022-08-13 Thread Chet Ramey
On 8/12/22 8:22 PM, Dennis Williamson wrote: set -x; unset a; b=2; c=7; ((a = b + c)); echo "$a $b $c"; set +x + unset a + b=2 + c=7 + (( a = b + c )) + echo '9 2 7' 9 2 7 + set +x without the dollar signs doesn't. "Within an expression, shell variables may also be referenced by name wit

Re: cut loadable outputs extra newlines

2022-08-13 Thread Martin D Kealey
I note that https://pubs.opengroup.org/onlinepubs/009696699/utilities/cut.html says: *> The elements in list can be repeated, can overlap, and can be specified in any order, but the bytes, characters, or fields selected shall be written in the order of the input data.* The intention behind this is

Re: cut loadable outputs extra newlines

2022-08-13 Thread Lawrence Velázquez
On Sat, Aug 13, 2022, at 10:06 PM, Martin D Kealey wrote: > I note that > https://pubs.opengroup.org/onlinepubs/009696699/utilities/cut.html says: > *> The elements in list can be repeated, can overlap, and can be specified > in any order, but the bytes, characters, or fields selected shall be > wr