calendar now looks a little better
parent
feef445ea6
commit
6d3813498a
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/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]/"
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue