From b0660441de984582c4c2fc97fa22c0cea2c17d84 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 18 Mar 2012 21:10:35 +0100 Subject: [PATCH] reset: make scripts bourne sh compliant [checkbashisms] In addition strict compliance the commit will take variable name quoting, and $(command) substitution in use. $ checkbashisms reset reset.033c possible bashism in reset line 11 ('$[' should be '$(('): bot=$[ ${LINES:-`tput lines`} - 1 ] possible bashism in reset.033c line 11 (echo -e): echo -e \\033c Signed-off-by: Sami Kerola --- term-utils/reset | 6 +++--- term-utils/reset.033c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 term-utils/reset diff --git a/term-utils/reset b/term-utils/reset old mode 100644 new mode 100755 index 92d2539070..68de82eb1c --- a/term-utils/reset +++ b/term-utils/reset @@ -8,6 +8,6 @@ tput rmul tput rs1 tput rs2 tput rs3 -bot=$[ ${LINES:-`tput lines`} - 1 ] -if test "$bot" -le "0"; then bot=24; fi -tput csr 0 $bot +bot=$((${LINES:-$(tput lines)} - 1)) +if test "${bot}" -le "0"; then bot=24; fi +tput csr 0 ${bot} diff --git a/term-utils/reset.033c b/term-utils/reset.033c index fb9834db2b..fc7fad6b12 100755 --- a/term-utils/reset.033c +++ b/term-utils/reset.033c @@ -8,4 +8,4 @@ tput rmul tput rs1 tput rs2 tput rs3 -echo -e \\033c +printf "\\033c\n" -- 2.47.2