Need help making a script

Here is what I have:

#!/bin/bash
# Setup year date and month
YR=`date +%Y '{print $6}'`
MON=`date +%b '{print $2}'`
DAY=`date +%d '{print $3}'`
file=$YR$MOY$DOM
# clear
# Dump database using USER/PASS to [filename].[date].sql
mysqldump --user=me -ppass database > database-db.$file.sql

The YR, MON and DAY dont work. Sounds like the data is not getting put into the variable .

What Am i doing wrong?

thanks for the help

At first glance it looks like you meant to pipe to awk, however, date +%Y does'nt yeild a sixth position to print so the variable is empty.

ok thanks

That's what it was.