From 1db90dfc84e2484a7e0e7509b2d92800d035880e Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Tue, 31 Mar 2015 15:59:36 +0200 Subject: shutdown: Use printf instead of echo -n The result of 'echo -n' is implementation-defined. See also: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html --- shutdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'shutdown') diff --git a/shutdown b/shutdown index db4c8ac..399ade6 100755 --- a/shutdown +++ b/shutdown @@ -56,18 +56,18 @@ esac if [ "$time" -gt 5 ]; then echo "$message in $time minutes" | wall - echo -n "shutdown: sleeping for $time minutes... " + printf "shutdown: sleeping for $time minutes... " sleep $(((time - 5) * 60)) - echo + printf "\n" time=5 fi if [ "$time" -gt 0 ]; then echo "$message in $time minutes" | wall touch /etc/nologin - echo -n "shutdown: sleeping for $time minutes... " + printf "shutdown: sleeping for $time minutes... " sleep $((time * 60)) - echo + printf "\n" rm /etc/nologin fi -- cgit 1.4.1