From b5014c5fa2be5ce3cfb7ed3163b1f4a8fd1b87fe Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Tue, 31 Mar 2015 15:56:46 +0200 Subject: shutdown: Don't use expr --- shutdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shutdown') diff --git a/shutdown b/shutdown index 448e6d5..db4c8ac 100755 --- a/shutdown +++ b/shutdown @@ -29,7 +29,7 @@ while getopts akrhPHfFnct: opt; do [?]) usage;; esac done -shift $(expr $OPTIND - 1) +shift $((OPTIND - 1)) [ $# -eq 0 ] && usage @@ -57,7 +57,7 @@ esac if [ "$time" -gt 5 ]; then echo "$message in $time minutes" | wall echo -n "shutdown: sleeping for $time minutes... " - sleep $(expr '(' "$time" - 5 ')' '*' 60) + sleep $(((time - 5) * 60)) echo time=5 fi @@ -66,7 +66,7 @@ if [ "$time" -gt 0 ]; then echo "$message in $time minutes" | wall touch /etc/nologin echo -n "shutdown: sleeping for $time minutes... " - sleep $(expr "$time" '*' 60) + sleep $((time * 60)) echo rm /etc/nologin fi -- cgit 1.4.1