Re: Fwd: Strange results

2023-10-27 Thread Kerin Millar
On Fri, 27 Oct 2023 19:28:15 +0700 Victor Pasko wrote: > Let me ask more questions presented in the sent bug2.bash > Look at the following lines: > > *printf -v a_int '%d' "'a" *# very strange syntax here to use char as > integer > echo "echo4 $a_int" # should be 97 at the end All impleme

Re: Fwd: Strange results

2023-10-27 Thread Kerin Millar
On Fri, 27 Oct 2023 15:34:16 +0100 Kerin Millar wrote: > Keep in mind that the Shell Command Language specification requires that > "Default Value" parameter expansion be implemented in the way that it is, and > that there are countless scripts that depend on the status quo. However, the > S

Re: Fwd: Strange results

2023-10-27 Thread Kerin Millar
-- > > > From: Victor Pasko > > > Date: Fri, Oct 27, 2023 at 1:57 AM > > > Subject: Re: Strange results > > > To: Dennis Williamson > > > > > > > > > > > > Also > > > > > > echo10 ${ASCII_SET:$((-10

Re: Fwd: Strange results

2023-10-27 Thread Victor Pasko
See my comments below inline On Fri, Oct 27, 2023 at 2:50 AM Kerin Millar wrote: > On Fri, 27 Oct 2023 02:00:01 +0700 > Victor Pasko wrote: > > > -- Forwarded message - > > From: Victor Pasko > > Date: Fri, Oct 27, 2023 at 1:57 AM > > Su

Re: Fwd: Strange results

2023-10-26 Thread Kerin Millar
On Fri, 27 Oct 2023 02:00:01 +0700 Victor Pasko wrote: > -- Forwarded message - > From: Victor Pasko > Date: Fri, Oct 27, 2023 at 1:57 AM > Subject: Re: Strange results > To: Dennis Williamson > > > > Also > > echo10 ${ASCII_SET:$((-10)):1}

Re: Strange results

2023-10-26 Thread alex xmb sw ratchev
On Thu, Oct 26, 2023, 9:07 PM Victor Pasko wrote: > -- Forwarded message - > From: Victor Pasko > Date: Fri, Oct 27, 2023 at 1:57 AM > Subject: Re: Strange results > To: Dennis Williamson > > > > Also > > echo10 ${ASCII_SET:$((-10)):1} >

Fwd: Strange results

2023-10-26 Thread Victor Pasko
-- Forwarded message - From: Victor Pasko Date: Fri, Oct 27, 2023 at 1:57 AM Subject: Re: Strange results To: Dennis Williamson Also echo10 ${ASCII_SET:$((-10)):1} and echo11 ${ASCII_SET:-10:1} have different behaviour:( Both of these say "output the character that&#

Fwd: Strange results

2023-10-26 Thread Dennis Williamson
-- Forwarded message - From: Dennis Williamson Date: Thu, Oct 26, 2023 at 12:09 PM Subject: Re: Strange results To: Victor Pasko echo "echo11 ${ASCII_SET:-10:1}"echo "echo11 ${ASCII_SET:-10:1}" On Thu, Oct 26, 2023 at 9:54 AM Victor Pasko wrote: > Hi,

Re: Strange results

2023-10-26 Thread Chet Ramey
On 10/26/23 10:53 AM, Victor Pasko wrote: See some strange results below echo9 u echo10 u And the most strange result echo11 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Why do you think the results are strange? Wh

Strange results

2023-10-26 Thread Victor Pasko
Hi, Attached please find bug2.bash. Here are results % bash --version GNU bash, version 5.2.15(3)-release (x86_64-pc-cygwin) % ./bug2.bash ASCII_SET-size=95 echo1 u echo2 u echo3 u echo4 97 echo5 u echo6 85 echo7 -10 echo8 -10 See some strange results below echo9 u echo10 u And the most strange