On 6/3/17 1:15 PM, Pranav Deshpande wrote:
> Hello,
> Sorry for the late reply.
>
> My solution is to change *line 294* of builtins/read.def.
>
> Change
> if (code == 0 || *intval < 0* || intval != (int)intval)
>
> to
>
> if (code == 0 || i*ntval <= 0* || intval != (int)intval)
That's a fine
On Sun, Jun 4, 2017 at 12:16 AM, dualbus wrote:
[...]
> Although there's a problem with the solution:
>
> dualbus@debian:~$ for sh in bash ~/src/gnu/bash-build/bash ksh93 mksh; do
> $sh -c ': | read -n 0; echo $?'; done
> 1
> 0
> 1
> 1
>
> Since the read(2) system
Is that more advantageous?
On Sun, Jun 4, 2017 at 10:46 AM, dualbus wrote:
> On Sun, Jun 04, 2017 at 01:45:42AM +0530, Pranav Deshpande wrote:
> [...]
> > My solution is to change *line 294* of builtins/read.def.
> >
> > Change
> > if (code == 0 || *intval < 0* || intval !=
On Sun, Jun 04, 2017 at 01:45:42AM +0530, Pranav Deshpande wrote:
[...]
> My solution is to change *line 294* of builtins/read.def.
>
> Change
> if (code == 0 || *intval < 0* || intval != (int)intval)
>
> to
>
> if (code == 0 || i*ntval <= 0* || intval != (int)intval)
[...]
> Is this solution
Hello,
Sorry for the late reply.
My solution is to change *line 294* of builtins/read.def.
Change
if (code == 0 || *intval < 0* || intval != (int)intval)
to
if (code == 0 || i*ntval <= 0* || intval != (int)intval)
Command:
./bash -c 'read -n0 <<< "abc";declare -p REPLY'
Output:
./bash: line
Thank you. I am travelling now and will look at it in 2 days.
Regards,
Pranav
On May 31, 2017 7:48 PM, "Chet Ramey" wrote:
> On 5/23/17 11:33 AM, Eduardo Bustamante wrote:
> > (I think this is a good problem for Pranav to tackle if you consider
> > this to be a bug, Chet).
On 5/23/17 11:33 AM, Eduardo Bustamante wrote:
> (I think this is a good problem for Pranav to tackle if you consider
> this to be a bug, Chet).
Thanks. Another one that he can look at and see how his solution compares
to mine.
Chet
--
``The lyf so short, the craft so long to lerne.'' -
(I think this is a good problem for Pranav to tackle if you consider
this to be a bug, Chet).
Current behavior:
dualbus@debian:~$ bash -c 'read -n0 <<< "abc"; declare -p REPLY'
declare -- REPLY="abc"
dualbus@debian:~$ bash --version|head -n1
GNU bash, version 4.4.11(1)-release