Suppose I have a file format I want to save database backups to given as such:
echo "~/backups/$(date +'%Y-%m-%d_%H-%M-%S').sql"
Now how can I specify this result as a filename for output in shell?
mysqldump my_db > ....?
By the way: shell interprets the result of a nested echo command as an executable command/file. So It would seem that:
mysqldump my_db > $(echo "something")
does NOT work. Instead, shell looks for a file called something
and tries executing it?