stderr-data.sh

来自「OpenSSL Source code for SFTP, SSH, and m」· Shell 代码 · 共 34 行

SH
34
字号
#	$OpenBSD: stderr-data.sh,v 1.2 2002/03/27 22:39:52 markus Exp $#	Placed in the Public Domain.tid="stderr data transfer"DATA=/bin/lsCOPY=${OBJ}/copyrm -f ${COPY}for n in '' -n; dofor p in 1 2; do	verbose "test $tid: proto $p ($n)"	${SSH} $n -$p -F $OBJ/ssh_proxy otherhost \		exec sh -c \'"exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \		2> ${COPY}	r=$?	if [ $r -ne 0 ]; then		fail "ssh failed with exit code $r"	fi	cmp ${DATA} ${COPY}	|| fail "stderr corrupt"	rm -f ${COPY}	${SSH} $n -$p -F $OBJ/ssh_proxy otherhost \		exec sh -c \'"echo a; exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \		> /dev/null 2> ${COPY}	r=$?	if [ $r -ne 0 ]; then		fail "ssh failed with exit code $r"	fi	cmp ${DATA} ${COPY}	|| fail "stderr corrupt"	rm -f ${COPY}donedone

⌨️ 快捷键说明

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