28 lines
508 B
Bash
Executable File
28 lines
508 B
Bash
Executable File
#!/bin/bash
|
|
today=$(date +%-d)
|
|
weekdaynum=$(date +%u)
|
|
weekday=""
|
|
if [[ $weekdaynum -eq 1 ]]; then
|
|
weekday="Mo"
|
|
elif [[ $weekdaynum -eq 2 ]]; then
|
|
weekday="Tu"
|
|
elif [[ $weekdaynum -eq 3 ]]; then
|
|
weekday="We"
|
|
elif [[ $weekdaynum -eq 4 ]]; then
|
|
weekday="Th"
|
|
elif [[ $weekdaynum -eq 5 ]]; then
|
|
weekday="Fr"
|
|
elif [[ $weekdaynum -eq 6 ]]; then
|
|
weekday="Sa"
|
|
elif [[ $weekdaynum -eq 7 ]]; then
|
|
weekday="Su"
|
|
fi
|
|
|
|
#echo $weekday
|
|
|
|
|
|
|
|
cal -m | sed "s/\b $today \b/[$today]/" | sed "s/\b $weekday \b/[$weekday]/"
|
|
|
|
|