Problem:
I have an escaped string saved within a variable:
escapedFileName='/dbDumps/Mon\ Oct\ \ 1\ 15\:22\:50\ UTC\ 2018.sql'
but whenever I try to use this file name within the following command, I get an error message saying that this path does not exist (even though it does).
/usr/bin/mysql -u root -pmypassword system < "$escapedFileName";
When i use the path and not the string it works :
/usr/bin/mysql -u root -pmypassword system < /dbDumps/Mon\ Oct\ \ 1\ 15\:22\:50\ UTC\ 2018.sql
What am I doing wrong ?