aboutsummaryrefslogtreecommitdiff
path: root/years.sh
blob: 49494cb4ee1eafe04ecc30bdb5a929f55cba4cd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
#  _   _  ___  __ _ _ __ ___ 
# | | | |/ _ \/ _` | '__/ __|
# | |_| |  __/ (_| | |  \__ \
#  \__, |\___|\__,_|_|  |___/
#  |___/                     
#
# Navigates through year calendars and exits with q

year=$(date +%Y)
ncal -b -y
read -n 1 input

while [ "$input" != "q" ]
do
	case $input in
		l)
			year=$(($year+1))
			;;
		h)
			year=$(($year-1))
			;;
	esac
		clear
		ncal -b -y $year
		read -n 1 input
done