Setting PATH with spaces in it


So the typical unix approach for dealing with spaces in a path is to double quote the path:

EG: /dir1/dir2/”dir with spaces in it”/dir3

The second approach is to use the escape character ‘\’

EG: /dir1/dir2/dir\ with\ spaces\ in\ it/dir3

But, on a mac you need to use both approaches for the PATH to be set correctly.

EG: /dir1/dir2/”dir\ with\ spaces\ in\ it”/dir3

Post to Twitter Tweet This Post

  1. No comments yet.
(will not be published)
  1. No trackbacks yet.