On Mon, May 1, 2017 at 11:58 PM, Eduardo Bustamante wrote:
> Thanks, the latest commit no longer crashes on any of the malformed input
> files.
>
> There's still a memory leak I hadn't noticed before:
>
[...]
> bash-4.4$ bind '\xx":""'
Actually, this one is shorter:
bind '\:""'
rl_translate_
Thanks, the latest commit no longer crashes on any of the malformed input files.
There's still a memory leak I hadn't noticed before:
dualbus@debian:~/src/gnu/bash$ ./bash
bash-4.4$ bind '\xx":""'
bash-4.4$ exit
=
==27221==ERROR: Le
On Mon, Apr 24, 2017 at 3:48 PM, Chet Ramey wrote:
[...]
> That works on Linux, but not on the BSDs, since Posix says it doesn't
> have to.
I see that a test for this has been added to comsub.tests:
dualbus@debian:~/src/gnu/bash$ git log -1 -p -- tests/comsub.tests
commit 2a39157723ffb7dfc597dfa
On Mon, May 1, 2017 at 8:52 PM, Eduardo Bustamante wrote:
> On Sat, Apr 29, 2017 at 8:56 PM, Adam Danischewski
> wrote:
>> In the documentation you linked to it says:
>>
>> -f file
>> True if file exists and is a regular file.
>>
>> The part of the documentation you cited states "Unless otherwise
On 4/30/17 11:23 AM, omasmotorrad wrote:
> Why is it that one cannot change the delimiter for the
> words generated during brace expansion?
Because they are separate words that are expanded individually, not
a single word that undergoes word splitting. They end up being
separate arguments to, e.g
On 5/1/17 11:21 AM, Florian Mayer wrote:
>> imadev:~$ {1..10}'+ 0'
>> + '1+ 0' '2+ 0' '3+ 0' '4+ 0' '5+ 0' '6+ 0' '7+ 0' '8+ 0' '9+ 0' '10+ 0'
>> bash: 1+ 0: command not found
>>
>> It most certainly does not evaluate to 55.
> Oh, it would've with the expansion put into arithmetic context.
It woul
On 5/1/17 10:37 AM, Florian Mayer wrote:
>
>> OK. This starts out as one word: "{1..10}'+' +0". Brace expansion
> Ok, that's obviously a dumb mistake. And everything you wrote is right.
>
> Just to clean up the mistake:
> $ (( {1..10}'+' 0)) # spaces before { and 0
>
> So, as you described, wha
imadev:~$ {1..10}'+ 0'
+ '1+ 0' '2+ 0' '3+ 0' '4+ 0' '5+ 0' '6+ 0' '7+ 0' '8+ 0' '9+ 0' '10+ 0'
bash: 1+ 0: command not found
It most certainly does not evaluate to 55.
Oh, it would've with the expansion put into arithmetic context.
Why can't we just write a loop?
Oh, WE could. But where woul
On Mon, May 01, 2017 at 04:37:10PM +0200, Florian Mayer wrote:
> $ "{1..10}'+' 0"
> actually is seen as
> $ "{1..10}'+ 0'" # postabmle = '+0'
> Then, it expands that to
> '1+ 0 2+ 0 3+ 0 4+ 0 5+ 0 6+ 0 7+ 0 8+ 0 9+ 0 10+ 0'
> and evaluates it arithmetically resulting in 55.
No, and no. I think yo
OK. This starts out as one word: "{1..10}'+' +0". Brace expansion
Ok, that's obviously a dumb mistake. And everything you wrote is right.
Just to clean up the mistake:
$ (( {1..10}'+' 0)) # spaces before { and 0
So, as you described, what bash actually does is it takes
$ (( {1..10}'+' 0))
go
On 5/1/17 9:49 AM, Florian Mayer wrote:
> However,
> $ (({1..10}'+' +0))
> Gives me "bash: ((: 1+ +0 2+ +0 3+ +0 4+ +0 5+ +0 6+ +0 7+ +0 8+ +0 9+ +0
> 10+ +0: syntax"
> which is the same thing I'd get, when I whould've done {1..10}'+ +0'. Thus
> in this same arithmetic expansion context bash _does
On 5/1/17 10:00 AM, Greg Wooledge wrote:
> On Mon, May 01, 2017 at 03:49:39PM +0200, Florian Mayer wrote:
>> However,
>> $ (({1..10}'+' +0))
>> Gives me "bash: ((: 1+ +0 2+ +0 3+ +0 4+ +0 5+ +0 6+ +0 7+ +0 8+ +0 9+
>> +0 10+ +0: syntax"
>> which is the same thing I'd get, when I whould've done {1.
On Mon, May 01, 2017 at 03:49:39PM +0200, Florian Mayer wrote:
> However,
> $ (({1..10}'+' +0))
> Gives me "bash: ((: 1+ +0 2+ +0 3+ +0 4+ +0 5+ +0 6+ +0 7+ +0 8+ +0 9+
> +0 10+ +0: syntax"
> which is the same thing I'd get, when I whould've done {1..10}'+ +0'. Thus
> in this same arithmetic expan
On 4/30/17 2:31 PM, Florian Mayer wrote:
> I want to add up all numbers from 1 to 10, but when I do
> $ echo $(({1,10}’+’ +0)) # with a space between the first + and the second one
> I get an error:
> bash: ((: 1+ ,3 10+ ,3: syntax error: operand expected (error token is ",3
> 10+ ,3“)
First of
From my previous mail:
$ echo $(({1..10}’+’ +0)) # with a space between the first + and the
second one
I'm sorry, I assumed that $(()) and (( )) so the exact same thing so I only
included the $(()) version instead of what I tested on my machine.
Apparently both versions do not behave the same.
If your commands "work" in your shell, but then magically transform into
unusable curly quote glyphs in your mail client, then it's probably your
mail client performing the transformation. Or your text editor, or your
web browser if you're using web-mail.
Your apostrophes in the words "don't" an
On Mon, May 01, 2017 at 03:29:43PM +0200, Florian Mayer wrote:
> > sum=0; for ((i=1; i<=10; i++)); do ((sum+=i)); done
> You can actually omit ???sum=0;???, because bash dereferences unset variables
> to 0
> (according to the holy manual of course).
Not if the user running the script exported sum
> sum=0; for ((i=1; i<=10; i++)); do ((sum+=i)); done
You can actually omit ‚sum=0;‘, because bash dereferences unset variables to 0
(according to the holy manual of course).
> I cannot figure out what you actually typed here, because your UTF-8
I don’t know what caused that, but it was not inten
On Sun, Apr 30, 2017 at 08:31:30PM +0200, Florian Mayer wrote:
> I want to add up all numbers from 1 to 10,
sum=0; for ((i=1; i<=10; i++)); do ((sum+=i)); done
> but when I do
> $ echo $(({1,10}???+??? +0)) # with a space between the first + and the
> second one
I cannot figure out what you ac
On 4/29/17 11:22 PM, L A Walsh wrote:
>
>
> Chet Ramey wrote:
>> On 4/28/17 8:09 PM, L A Walsh wrote:
>>> ls **Tokyo*
>>> (nothing)
>>> ls ***Tokyo*
>>> (nothing)
>>> ls **Tokyo**Tokyo*
>>> (nothing)
>>> ls **/*Tokyo*
>>> (found multiple matches (including the one I was
>>> searching for))
>>>
On Sat, Apr 29, 2017 at 07:47:06PM -0400, Adam Danischewski wrote:
> $ [[ -L
> "/mnt/samsung32/.word_list_repo/instruments_song_repo/546725_pinstripe.mp3"
> ]] && echo hi
> hi
> $ [[ -f
> "/mnt/samsung32/.word_list_repo/instruments_song_repo/546725_pinstripe.mp3"
> ]] && echo hi
> hi
>
> It looks
21 matches
Mail list logo