diff options
author | Sami Kerola | 2012-03-18 21:10:35 +0100 |
---|---|---|
committer | Karel Zak | 2012-03-30 16:48:12 +0200 |
commit | b0660441de984582c4c2fc97fa22c0cea2c17d84 (patch) | |
tree | f46f8857272e76f59fb7482784d9b36807091066 /term-utils | |
parent | fstrim: add --version and align with howto-usage-function.txt (diff) | |
download | kernel-qcow2-util-linux-b0660441de984582c4c2fc97fa22c0cea2c17d84.tar.gz kernel-qcow2-util-linux-b0660441de984582c4c2fc97fa22c0cea2c17d84.tar.xz kernel-qcow2-util-linux-b0660441de984582c4c2fc97fa22c0cea2c17d84.zip |
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 <kerolasa@iki.fi>
Diffstat (limited to 'term-utils')
-rwxr-xr-x[-rw-r--r--] | term-utils/reset | 6 | ||||
-rwxr-xr-x | term-utils/reset.033c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/term-utils/reset b/term-utils/reset index 92d253907..68de82eb1 100644..100755 --- 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 fb9834db2..fc7fad6b1 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" |