Hi,
We've come upon a problem wherein to put a file on a remote server, we must issue a cd from the default home directory to a subdirectory with a blank in its name. For example, the home directory would be /root/level1/level2 and we need to cd to a subdirectory with the name "BL ANK" (without the quotes). Is there a way to do this?
Thanks in advance for any advice.
Mike
cd to a directory with a blank in its name
Re: cd to a directory with a blank in its name
You can enclose the argument to cd in double quotes:
or
Code: Select all
cd "BL ANK"
Code: Select all
cd "/home/user/my dir with spaces"
Re: cd to a directory with a blank in its name
Thanks for the quick reply. That works, but what my user wants to do in batch is send from an MVS dataset to this directory with the blanks in it. If I put the double-quotes in the rfile statement, it doesn't take it when I call sftp_put.sh. I can connect using sftp_connect.sh, but can I send an MVS dataset from within that script?
Thanks again.
Thanks again.
Re: cd to a directory with a blank in its name
If you don't need to do any interpolation, you can enclose the argument in single quotes:
If you need to interpolate, you can escape the inner quotes:
Code: Select all
rfile='"/home/user/dir with spaces/"'
Code: Select all
rfile="\"/home/user/${some_zos_sh_var}/dir with spaces/\""