mirror of
https://github.com/sheumann/hush.git
synced 2024-12-28 22:30:05 +00:00
20 lines
417 B
Plaintext
Executable File
20 lines
417 B
Plaintext
Executable File
# tests of return value inversion
|
|
# placeholder for future expansion
|
|
|
|
# user subshells (...) did this wrong in bash versions before 2.04
|
|
|
|
! ( echo hello | grep h >/dev/null 2>&1 ); echo $?
|
|
! echo hello | grep h >/dev/null 2>&1 ; echo $?
|
|
|
|
! true ; echo $?
|
|
! false; echo $?
|
|
|
|
! (false) ; echo $?
|
|
! (true); echo $?
|
|
|
|
! true | false ; echo $?
|
|
! false | true ; echo $?
|
|
|
|
! (true | false) ; echo $?
|
|
! (false | true) ; echo $?
|