📄 row-col-1
字号:
#! /bin/sh# This script takes no arguments.if test "$VERBOSE" = yes; then set -x stty --versionfi# Setting this envvar to a very small value used to cause e.g., `stty size'# to generate slightly different output on certain systems.COLUMNS=80export COLUMNS# Make sure there's a tty on stdin.. $srcdir/../input-tty# Versions of GNU stty from shellutils-1.9.2c and earlier failed# tests #2 and #4 when run on SunOS 4.1.3.tests='1 rows_40_columns_80 40_802 rows_0_columns_0 0_03 rows_40_columns_80 40_804 rows_0 0_805 columns_0 0_06 rows_40 40_07 rows_0 0_08 columns_80 0_809 rows_30 30_80NA LAST NA'set - $testssaved_size=.saved-sizestty size > $saved_size \ || { echo "$0: skipping this test: can't get window size" 1>&2; exit 77; exit; }fail=0while :; do test_name=$1 args=$2 expected_result="`echo $3|tr _ ' '`" test "$args" = empty && args='' test "x$args" = xLAST && break args=`echo x$args|tr _ ' '|sed 's/^x//'` if test "$VERBOSE" = yes; then # echo "testing \`stty $args; stty size\` = $expected_result ..." echo "test $test_name... " | tr -d '\012' fi stty $args || exit 1 test x"`stty size 2> /dev/null`" = "x$expected_result" \ && ok=ok || ok=FAIL fail=1 test "$VERBOSE" = yes && echo $ok shift; shift; shiftdonestty `cat $saved_size|sed 's/ / columns /;s/^/rows /'` || exit 1rm -f $saved_sizeexit $fail
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -