diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2019-05-23 11:30:25 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2019-05-23 11:30:25 +0200 |
commit | 7cde0dc02c0a8349ab7769f934a29cf1578995b5 (patch) | |
tree | 4cefe1f81b76abce02aaac62b0ebc08a3f7870e6 /years.sh | |
parent | c3856a49d47c164991550f10ace030eb6a646ce6 (diff) | |
download | scripts-7cde0dc02c0a8349ab7769f934a29cf1578995b5.tar.gz scripts-7cde0dc02c0a8349ab7769f934a29cf1578995b5.zip |
Changed calendars to bash and standardize code.
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 |