SHARE
TWEET

How to use date

a guest May 31st, 2012 61 Never
  1. y=`date +%Y`
  2. while true ; do
  3.     case `date +%u --date="December 25, $y"` in
  4.         2) echo $y ; break ;;
  5.     esac
  6.     let y=y-1
  7. done
RAW Paste Data
Top