Denis Vlasenko | a844200 | 2008-06-14 11:00:17 +0000 | [diff] [blame] | 1 | echo ! printing ! |
| 2 | ! false |
| 3 | echo $? |
| 4 | ! true |
| 5 | echo $? |
| 6 | if ! false; then false; echo $?; fi |
| 7 | echo $? |
| 8 | if ! false; then ! false; echo $?; fi |
| 9 | echo $? |
Denys Vlasenko | 0951606 | 2009-08-12 14:21:30 +0200 | [diff] [blame] | 10 | PRINTF=`which printf` |
Denis Vlasenko | a844200 | 2008-06-14 11:00:17 +0000 | [diff] [blame] | 11 | for a in ! a b c; do echo $a; done |
Mike Frysinger | c3d9195 | 2009-04-09 07:50:02 +0000 | [diff] [blame] | 12 | for a in ! a b c; do ! printf "$a "; echo $?; done |
Denys Vlasenko | 0951606 | 2009-08-12 14:21:30 +0200 | [diff] [blame] | 13 | test x"$PRINTF" = x"" && exit 1 |
| 14 | for a in ! a b c; do ! "$PRINTF" "$a "; echo $?; done |
Mike Frysinger | c3d9195 | 2009-04-09 07:50:02 +0000 | [diff] [blame] | 15 | for a in ! a b c; do ! printf "$a " | false; echo $?; done |
| 16 | for a in ! a b c; do ! printf "$a " | true; echo $?; done |
| 17 | for a in ! a b c; do ! { printf "$a " | false; }; echo $?; done |
| 18 | for a in ! a b c; do ! { printf "$a " | true; }; echo $?; done |
Denys Vlasenko | 0951606 | 2009-08-12 14:21:30 +0200 | [diff] [blame] | 19 | echo Done |