Linux

Print last Sunday of month

This is a bash oneliner to get the date of the last Sunday in the month, nice to have if you cannot figure out an easy solution in crontab. # cal -m | awk ‘{print $7}’ | grep -E ‘[0-9]’ | tail -n 1 28 or only using awk # cal -m | awk ‘$7!=””{l=$7} […]

Read More