Ok, I accept your points, but please read on and decide after that.
> to do anything but assign a value to `var'. Very few people, when asked,
> would say that it were more intuitive to cause a variable named `bar' to
> spring into existence with the value 7. If you want nameref behavior, you
> h
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc -I/home/abuild/rpmbuild/BUILD/bash-4.4
-L/home/abuild/rpmbuild/BUILD/bash-4.4/../readline-7.0
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -D
On Mon, Apr 24, 2017 at 1:59 PM, wrote:
> (...)
>
> and yes
>
> V_NAME=Friday
> for (( INDEX=0; INDEX<$((10-${#V_NAME})) ; INDEX++ ))
> do
> echo $INDEX
> done
>
> does also work, nevertheless using $(...) in the very first example is
> allowed
>
>
or e
On Mon, Apr 24, 2017 at 02:25:41PM +0300, Pierre Gaston wrote:
> On Mon, Apr 24, 2017 at 1:59 PM, wrote:
>
> > (...)
> >
> > and yes
> >
> > V_NAME=Friday
> > for (( INDEX=0; INDEX<$((10-${#V_NAME})) ; INDEX++ ))
> > do
> > echo $INDEX
> > done
> >
> >
It is essential to not break backward
compatibility. Imagine the huge number of scripts that would be
impacted by the semantic shift you're suggesting. If a proposal
were to be made that would cause backward incompatibility, then
any such proposal should be reject
On Mon, Apr 24, 2017 at 12:59:01PM +0200, wer...@suse.de wrote:
> V_NAME=Friday
> for (( INDEX=0; INDEX<$((10-$(expr length $V_NAME))); INDEX++ ))
The outer (( )) in the C-style for loop already create an arithmetic
expression context. You don't need to use $(( )) inside them. You ca
On Mon, Apr 24, 2017 at 7:44 AM, Greg Wooledge wrote:
[...]
> The outer (( )) in the C-style for loop already create an arithmetic
> expression context. You don't need to use $(( )) inside them. You can
> simply write:
>
> for (( INDEX=0; INDEX<10-${#V_NAME};; INDEX++ ))
I think this is just to
On Mon, Apr 24, 2017 at 08:44:11AM -0400, Greg Wooledge wrote:
> On Mon, Apr 24, 2017 at 12:59:01PM +0200, wer...@suse.de wrote:
> > V_NAME=Friday
> > for (( INDEX=0; INDEX<$((10-$(expr length $V_NAME))); INDEX++ ))
>
> The outer (( )) in the C-style for loop already create an arithmetic
>
On Mon, Apr 24, 2017 at 07:49:36AM -0500, Eduardo Bustamante wrote:
> On Mon, Apr 24, 2017 at 7:44 AM, Greg Wooledge wrote:
> [...]
> > The outer (( )) in the C-style for loop already create an arithmetic
> > expression context. You don't need to use $(( )) inside them. You can
> > simply write:
> Am 24.04.2017 um 14:58 schrieb Greg Wooledge :
>
> On Mon, Apr 24, 2017 at 07:49:36AM -0500, Eduardo Bustamante wrote:
>> On Mon, Apr 24, 2017 at 7:44 AM, Greg Wooledge wrote:
>> [...]
>>> The outer (( )) in the C-style for loop already create an arithmetic
>>> expression context. You don't n
On 4/23/17 9:02 PM, Eduardo Bustamante wrote:
> I built bash using scan-build
> (https://clang-analyzer.llvm.org/scan-build.html) and I noticed that
> it was able to detect the null pointer dereference reported earlier by
> Jaren (https://lists.gnu.org/archive/html/bug-bash/2017-04/msg00100.html).
On 4/24/17 3:59 AM, Florian Mayer wrote:
> Ok, I accept your points, but please read on and decide after that.
>
>> to do anything but assign a value to `var'. Very few people, when asked,
>> would say that it were more intuitive to cause a variable named `bar' to
>> spring into existence with th
On 4/24/17 6:59 AM, wer...@suse.de wrote:
> Bash Version: 4.4
> Patch Level: 12
> Release Status: release
>
> Description:
> Since 4.3 including 4.4 bash shows a bug in loops using nested ((...)),
> $((..)), and $(...)
>
> Repeat-By:
> The bash code
>
> V_NAME=Friday
> for ((
On 4/24/17 8:58 AM, Greg Wooledge wrote:
> Seriously, "expr length"?! In a script that is already using bashisms?
That works on Linux, but not on the BSDs, since Posix says it doesn't
have to.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita br
14 matches
Mail list logo