1 |
Here's another good one, this time from ibm-jdk-bin: |
2 |
|
3 |
if [ !`use X` ] ; then |
4 |
|
5 |
Btw, every one of these that I have posted is truly broken, i.e. it |
6 |
will probably do the opposite of what the author intended, if bash can |
7 |
manage to execute it at all. |
8 |
|
9 |
In this example, the condition will always be true, because both ! and |
10 |
!X are non-empty strings. The correct version would be |
11 |
|
12 |
if [ ! "`use X`" ] ; then |
13 |
|
14 |
but the REALLY CORRECT version is |
15 |
|
16 |
if ! use X; then |
17 |
|
18 |
Regards, |
19 |
Aron |
20 |
|
21 |
-- |
22 |
Aron Griffis |
23 |
Gentoo Linux Developer |