From b5f1a88973b4215d43bbbbb54a021aa566c1f587 Mon Sep 17 00:00:00 2001 From: Alexander Kozhevnikov Date: Tue, 19 May 2015 06:24:23 +0000 Subject: [PATCH] printf instead of echo for printing exitcode, because even though there is no functional difference, I think it is good habit to printf, echo was just in there from prototyping. --- sshh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sshh b/sshh index 1eec343..5c265f0 100755 --- a/sshh +++ b/sshh @@ -1,6 +1,6 @@ #!/bin/sh -# SSH History Logger 1.0.1 -# Copyright (C) Alexander Kozhevnikov 2015-05-09; +# SSH History Logger 1.0.2 +# Copyright (C) Alexander Kozhevnikov 2015-05-10; # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licence as published by @@ -36,7 +36,7 @@ timestamp=`date -Is | sed s/://g` logfile=`mktemp "$logdir"/"$timestamp"_"$*"_XXXXXX` || exit 2 exec 4>&1 -exitcode=`((ssh ${1+"$@"}; echo $? 1>&3) | tee -i "$logfile" 1>&4) 3>&1` +exitcode=`((ssh ${1+"$@"}; printf $? 1>&3) | tee -i "$logfile" 1>&4) 3>&1` exec 4>&- exit $exitcode