free Britney


SUBMITTED BY: Guest

DATE: Dec. 14, 2013, 12:20 p.m.

FORMAT: Text only

SIZE: 546 Bytes

HITS: 1403

  1. date_dir=`date +%Y-%m-%d -d yesterday`
  2. echo "$date_dir"
  3. var=`date +%s`;
  4. date=`date --date=@$var +%Y-%m-%d`
  5. echo $date
  6. $ date +%Y-%m-%d -d '-42 days' # This would subtract 42 days from the current date
  7. 2013-10-30
  8. $ date +%Y-%m-%d -d '+42 days' # This would add 42 days to the current date
  9. 2014-01-22
  10. $ date_dir=$(date +%Y-%m-%d -d '-42 days')
  11. $ echo $date_dir
  12. 2013-10-30

comments powered by Disqus