3 $binfalse || return 1 # normalize return value
6 if [ -x /usr/bin/true ]; then
8 elif [ -x /bin/true ]; then
13 if [ -x /usr/bin/false ]; then
14 binfalse=/usr/bin/false
15 elif [ -x /bin/false ]; then
25 echo after 1: foo = $foo
29 printf "%d\n" 1 2 3 | while read foo; do tot+=$foo; done
30 echo after 2: tot = $tot
37 printf "%s\n" a b c | while read foo; do last=$foo; done
41 echo $? -- ${PIPESTATUS[@]}
43 true | false | $bintrue
44 echo $? -- ${PIPESTATUS[@]}
46 true | $bintrue | false
47 echo $? -- ${PIPESTATUS[@]}
50 true | $bintrue | false
51 echo $? -- ${PIPESTATUS[@]}
53 true | binfalse | true
54 echo $? -- ${PIPESTATUS[@]}
57 ${THIS_SH} ./lastpipe1.sub
58 echo lastpipe1.sub returns $?