lineno.t

来自「一个开放源代码的 AT&T 的 Korn Shell 的复制品, 支持大多数 k」· T 代码 · 共 112 行

T
112
字号
name: lineno-stdindescription:	See if $LINENO is updated and can be modified.stdin:	echo A $LINENO	echo B $LINENO	LINENO=20	echo C $LINENOexpected-stdout:	A 1	B 2	C 20---name: lineno-incdescription:	See if $LINENO is set for .'d files.file-setup: file 644 "dotfile"	echo dot A $LINENO	echo dot B $LINENO	LINENO=20	echo dot C $LINENOstdin:	echo A $LINENO	echo B $LINENO	. ./dotfileexpected-stdout:	A 1	B 2	dot A 1	dot B 2	dot C 20---name: lineno-funcdescription:	See if $LINENO is set for commands in a function.stdin:	echo A $LINENO	echo B $LINENO	bar() {	    echo func A $LINENO	    echo func B $LINENO	}	bar	echo C $LINENOexpected-stdout:	A 1	B 2	func A 4	func B 5	C 8---name: lineno-unsetdescription:	See if unsetting LINENO makes it non-magic.file-setup: file 644 "dotfile"	echo dot A $LINENO	echo dot B $LINENOstdin:	unset LINENO	echo A $LINENO	echo B $LINENO	bar() {	    echo func A $LINENO	    echo func B $LINENO	}	bar	. ./dotfile	echo C $LINENOexpected-stdout:	A	B	func A	func B	dot A	dot B	C---name: lineno-unset-usedescription:	See if unsetting LINENO makes it non-magic even	when it is re-used.file-setup: file 644 "dotfile"	echo dot A $LINENO	echo dot B $LINENOstdin:	unset LINENO	LINENO=3	echo A $LINENO	echo B $LINENO	bar() {	    echo func A $LINENO	    echo func B $LINENO	}	bar	. ./dotfile	echo C $LINENOexpected-stdout:	A 3	B 3	func A 3	func B 3	dot A 3	dot B 3	C 3---

⌨️ 快捷键说明

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