Ubuntu – Shell not handling escape character spaces

bashcommand linescripts

Recently it seems that shell has changed how it handles spaces in parameters. It used to handle them properly (Or at least as I intended it to), but now it recognises it as a bunch of different parameters and completely misses the escape character.

An example of a small script that used to work very well:

exec /home/evan/.applications/Sublime\ Text\ 2/sublime_text $1

So I would give it some filepath with spaces and it used to open the proper file
eg, /home/evan/Document/My\ File\ Path/file.txt would open that file.txt.
Now it opens "My", "File", "Path", and some unknown "file.txt" Obviously, that won't be the file.txt that I am looking for.

Any help would be appreciated. Thank you in advance.

OS: Ubuntu 13.04 GNOME edition
with latest updates

I forgot to mention that the command executes perfect. The parameter does not.

Best Answer

That's why we use quotes.

... "$1"
Related Question