Respected Contributor Respected Contributor
Re: How to get 5th Saturday?
seems like a lot of trouble - the following snippet will return the 5th saturday of the current month, or a blank if there is none:

cal | awk 'NR==7{print $7}'

you could run this on the first of each month and based on the output, generate the alert. for example:

sat5=$( cal | awk 'NR==7{print $7}' )
if [[ -n $sat5 ]]; then
: alert logic here