[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The usage of [[ (not with if)
From: |
Bob Proulx |
Subject: |
Re: The usage of [[ (not with if) |
Date: |
Wed, 4 Aug 2010 10:12:55 -0600 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Andreas Schwab wrote:
> Bob Proulx writes:
> > Neither of those produce any output.
> >
> > $ printf '%d\n' ""
> > 0
>
> Since the command substitution is not quoted the result of the expansion
> is subject to field splitting, thus expands to nothing at all instead of
> a single empty argument.
Ah, yes, you are right of course. I should have said:
$ printf '%d\n'
0
Thanks!
Bob