lastpipe.tests

来自「android-w.song.android.widget」· TESTS 代码 · 共 59 行

TESTS
59
字号
binfalse(){	$binfalse || return 1	# normalize return value}if [ -x /usr/bin/true ]; then	bintrue=/usr/bin/trueelif [ -x /bin/true ]; then	bintrue=/bin/trueelse	bintrue=truefiif [ -x /usr/bin/false ]; then	binfalse=/usr/bin/falseelif [ -x /bin/false ]; then	binfalse=/bin/falseelse	binfalse=truefishopt -s lastpipeunset foo barecho a b c | read fooecho after 1: foo = $foounset totdeclare -i totprintf "%d\n" 1 2 3 | while read foo; do tot+=$foo; doneecho after 2: tot = $totunset barecho g h i | bar=7echo after: $barunset foo lastprintf "%s\n" a b c | while read foo; do last=$foo; doneecho last = $lastexit 142 | falseecho $? -- ${PIPESTATUS[@]}true | false | $bintrueecho $? -- ${PIPESTATUS[@]}true | $bintrue | falseecho $? -- ${PIPESTATUS[@]}set -o pipefailtrue | $bintrue | falseecho $? -- ${PIPESTATUS[@]}true | binfalse | trueecho $? -- ${PIPESTATUS[@]}set +o pipefail${THIS_SH} ./lastpipe1.subecho lastpipe1.sub returns $?

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?