1

Trouble in script with spaces in filename

view story
linux-howto

http://unix.stackexchange.com – I've got a script that scp's a file from remote host back to local. Sometimes the file names contain spaces. scp does not like spaces in its file names. For some reason my attempts at handling the spaces have not resulted in the correct scp path. Code: PATH=/var/root/Documents/MyFile OG-v1.2.3.pkg scp $PATH [email protected]:/Users/Me/Desktop Results in Cannot find directory: var/root/Documents/MyFile Cannot find directory: OG-v1.2.3.pkg Enclosing PATH in quotes "$PATH" gives the same error. Swapping the spaces for escaped spaces also is not working, although as far as I can tell it should (HowTos)