diff --git a/bin/date b/bin/date index e6d2c309..1d98b672 100755 --- a/bin/date +++ b/bin/date @@ -17,11 +17,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [ "$1" = "--detail" ]; then - date - exit 0 -elif [ "$1" = "--short" ]; then - date +%Y-%m-%d - exit 0 -fi -printf "\005Y-\005m-\005d " +case "$1" in + --detail) + date + ;; + --short) + date +%Y-%m-%d + ;; + *) + printf "\005Y-\005m-\005d " + ;; +esac diff --git a/bin/time b/bin/time index a02858ea..a198364d 100755 --- a/bin/time +++ b/bin/time @@ -17,12 +17,15 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [ "$1" = "--detail" ]; then - date - exit 0 -elif [ "$1" = "--short" ]; then - date +%H:%M:%S - exit 0 -fi +case "$1" in + --detail) + date + ;; + --short) + date +%H:%M:%S + ;; + *) + printf "\0050c:\005s" + ;; +esac -printf "\0050c:\005s"