Problem running .command file [duplicate]
I am trying to include a command in a TeX file to a bibliography file that I am storing centrally.
However, when including the filepath, like
/Foldername with whitespace/ANOTHER folder name with whitespace/nowsinfldrname/bibo.bib
my Unix-based typesetting system complains. Is there a way to rectify that other than renaming my folders?
Solution 1:
In bash, there are two main ways to have spaces in path names:
-
Backslash escape the spaces
/path/to/folder\ with\ spaces/
-
Wrap with quote marks
"/path/to/folder with spaces and $variable/"
'/path/to/folder with spaces and a literal $/'
Double quote marks expand shell variables. Single quote marks do not.
Solution 2:
Escape the spaces with a backslash:
This\ has\ spaces