aboutsummaryrefslogtreecommitdiff
path: root/years.sh
diff options
context:
space:
mode:
Diffstat (limited to 'years.sh')
-rwxr-xr-xyears.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/years.sh b/years.sh
index a3f2f5e..65fbe5e 100755
--- a/years.sh
+++ b/years.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# _ _ ___ __ _ _ __ ___
# | | | |/ _ \/ _` | '__/ __|
# | |_| | __/ (_| | | \__ \
@@ -9,20 +9,20 @@
year=$(date +%Y)
cal -m -y
-read -n 1 input
+read -rn 1 input
while [ "$input" != "q" ]
do
- case $input in
+ case "$input" in
l)
- year=$(($year+1))
+ year=$((year+1))
;;
h)
- year=$(($year-1))
+ year=$((year-1))
;;
esac
- clear
- cal -m -y $year
- read -n 1 input
+ clear
+ cal -m -y "$year"
+ read -rn 1 input
done