I tried using $(date) in my bash shell script, however I want the date in YYYY-MM-DD format. How do I get this?
$(date)
You can do something like this:
$ date +'%Y-%m-%d'
Try:
DATE=`date +%Y-%m-%d`
Try: $(date +%F)
$(date +%F)