#!/bin/sh DaySuffix() { case $day in 1|21|31) echo "st";; 2|22) echo "nd";; 3|23) echo "rd";; *) echo "th";; esac } day=$(date +%d | sed 's/^0*//') text=$(date "+%A $day$(DaySuffix) %B %Y - %H:%M") echo "$text "