[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Brace expansion with empty args
From: |
Pierre Gaston |
Subject: |
Re: [Help-bash] Brace expansion with empty args |
Date: |
Fri, 14 Jun 2013 15:51:37 +0300 |
On Fri, Jun 14, 2013 at 3:32 PM, Greg Wooledge <address@hidden> wrote:
> On Fri, Jun 14, 2013 at 12:37:25PM +0200, Roman Rakus wrote:
>> On 06/14/13 06:20, Masaki Saito wrote:
>> >I had thought that `nothing' is same as null string.
>> >But manual says that preamble and postscript are optional.
>
>> >What's different about nothing and null string?
>
> Honestly, I don't know whether this is a bug or not. I tend to avoid
> brace expansion.
>
> Since it's a bash extension, and not part of POSIX, there's no formal
> specification for how it's *supposed* to work, so only Chet can decide
> whether it's doing what it should.
>
>> In fact it generates null string, but word splitting will erase it. (at
>> least I believe in it)
>
> That's not correct. There's no word splitting of the results.
>
> imadev:~$ printf '<%s> ' {,c}; echo
> <c>
> imadev:~$ printf '<%s> ' ''{,c}; echo
> <> <c>
> imadev:~$ printf '<%s> ' ' '{,c}; echo
> < > < c>
> imadev:~$ printf '<%s> ' 'a '{,c}; echo
> <a > <a c>
>
>From the previous discussions about {} on bug-bash, brace expansion is
a textual thing.
So I guess it's just that ''{,} result in the text '' '', while {,}
results in not text, or perhaps in a whitespace
- [Help-bash] Brace expansion with empty args, 齋藤正樹, 2013/06/12
- Re: [Help-bash] Brace expansion with empty args, Pierre Gaston, 2013/06/12
- Re: [Help-bash] Brace expansion with empty args, Greg Wooledge, 2013/06/12
- Re: [Help-bash] Brace expansion with empty args, Masaki Saito, 2013/06/14
- Re: [Help-bash] Brace expansion with empty args, Roman Rakus, 2013/06/14
- Re: [Help-bash] Brace expansion with empty args, Greg Wooledge, 2013/06/14
- Re: [Help-bash] Brace expansion with empty args,
Pierre Gaston <=
- Re: [Help-bash] Brace expansion with empty args, Greg Wooledge, 2013/06/14
- Re: [Help-bash] Brace expansion with empty args, Roman Rakus, 2013/06/14
- Re: [Help-bash] Brace expansion with empty args, Greg Wooledge, 2013/06/14
- Re: [Help-bash] Brace expansion with empty args, Pierre Gaston, 2013/06/14
- Re: [Help-bash] Brace expansion with empty args, Chet Ramey, 2013/06/25
- Re: [Help-bash] Brace expansion with empty args, Roman Rakus, 2013/06/14
- Re: [Help-bash] Brace expansion with empty args, Pierre Gaston, 2013/06/14
- Re: [Help-bash] Brace expansion with empty args, Chet Ramey, 2013/06/25
- Re: [Help-bash] Brace expansion with empty args, Chet Ramey, 2013/06/25