i'm trying to get an old date in a bash script, but it throws this error
"./bkc.sh: line 10: 20130122: command not found"
It's like tries to use the result date as a function instead of assign the value to the OLDATE var.
Here's my code:
OLDATE= `date -d '7 days ago' +'%Y%m%d'`
Can anyone help me ? Thanks