#!/bin/ksh -p # Shell script to show date in English rather than computerese day=$(( $(date '+%d') % 100 )) fd=$(( day / 10 )) ld=$(( day - ( fd * 10 ) )) wday=$( date '+%A' ) month=$( date '+%B' ) year=$( date '+%Y' ) suff="th" if (( $fd != 1 )) then if (( $ld == 1 )) ; then suff="st" ; fi if (( $ld == 2 )) ; then suff="nd" ; fi if (( $ld == 3 )) ; then suff="rd" ; fi fi echo "$wday the $day$suff of $month, $year"