This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

How to use date

By: a guest on May 31st, 2012  |  syntax: Bash  |  size: 0.14 KB  |  views: 55  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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
clone this paste RAW Paste Data