diff options
Diffstat (limited to 'years.sh')
-rwxr-xr-x | years.sh | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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 |