As the title and sub-title say. Nerds may get off it, though!
Code: Select all
#!/bin/bash
# /root/my-applications/bin/ThisWeek.sh
#
# Purpose: Show this week's dates.
#
# Result --
# Shows the abbreviations of the week days
# in the system's default language on top,
# Then on the 2nd line, it shows the week
# number for the month, a tab and the
# dates for that week.
#
# Required: awk, busybox cal, nl.
#
# © Christian L'Écuyer, Gatineau (Qc), Canada, 18 nov. 2018. GPL3.
# (Alias musher0 [forum Puppy].) # Rév. : None yet.
####
# case "${LANG:0:2}" in
# en)echo blabla > /dev/null ;;
# *)LangVx="$LANG"
# export LANG=en_CA ;;
# esac
# Comment out the five lines above if you wish to have
# the output in the system's default language, if the
# system's default language is not English.
echo -e "\n\t\e[35m\e[4m`busybox cal | grep -v '[[:digit:]]'`\e[1A\e[0m"
busybox cal | grep -v '[[:alpha:]]' | nl -w2 -nln | awk '$0 ~ /18/'
# If for a strange reason you do not have busybox on your system,
# replace the < busybox cal > command above with the syntax for the
# GNU cal, which is < cal -s >.
# [ "${LangVx}" != "" ] && export LANG="$LangVx"
# Comment out the line above to restore the original LANG var., if need be.
Screenshot of result, for this month of November 2018, is attached.
BFN.