Em (02:25:11), Andreas Schwab escreveu:
>Herculano Einloft writes:
>
>> Hey all,
>>
>> $ if $(echo string >/dev/null); then echo true; fi
>> true
>>
>> This should be a syntax error
>
>No, it is a perfectly valid command, syntac
Em (21:43:32), Mike Frysinger escreveu:
>On Saturday 15 April 2006 19:55, Herculano Einloft wrote:
>> $ if $(echo string >/dev/null); then echo true; fi
>> true
>>
>> This should be a syntax error, since
>>
>> $ if; then echo true; fi
&
Em (02:25:11), Andreas Schwab escreveu:
>
>> Hey all,
>>
>> $ if $(echo string >/dev/null); then echo true; fi
>> true
>>
>> This should be a syntax error
>
>No, it is a perfectly valid command, syntactically. That the command
>substitution expands to nothing has no significance any more
Hey all,
$ if $(echo string >/dev/null); then echo true; fi
true
This should be a syntax error, since
$ if; then echo true; fi
bash: syntax error near unexpected token `;'
Tested on
GNU bash, version 2.05b.0(1)-release (i386-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, In