[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Brace expansion with empty args
From: |
Greg Wooledge |
Subject: |
Re: [Help-bash] Brace expansion with empty args |
Date: |
Fri, 14 Jun 2013 08:32:15 -0400 |
User-agent: |
Mutt/1.4.2.3i |
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>
- [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 <=
- Re: [Help-bash] Brace expansion with empty args, Pierre Gaston, 2013/06/14
- 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