I'm creating a simple .sh and trying to put a date(yyyymmdd) in the end of my filename
today=$(date +"%Y%m%d")
file="/nas/backup_$today.sql"
echo $file
But when I print the name, this is the result:
.sql/backup_02_10_2022
How can I keep the ".sql" in the end of the name?