1

File paths with spaces in a variable

view story
linux-howto

http://www.unix.com – Hi all my very first post so go easy on me!! I am trying to build a very simple script to list a file path with spaces in. But I can't get around this problem. My script is as follows: #!/bin/bash X="/Library/Users/Application\ Support/" LS="ls" AL="-al" $LS $AL $X The response I get is this ls: /Library/Application\: No such file or directory ls: Support/: No such file or directory I know this is a problem with the space in the file path but I thought the "" would pass to the commandline with no issues but I am wrong. (HowTos)