Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

share|improve this question
up vote 4 down vote accepted

That's why we use quotes.

... "$1"
share|improve this answer
Short answer, but straight to the point. :) I'll throw in this link which explains it more in detail – geirha May 24 '13 at 5:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.