Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quoting for scp call #105

Open
bsutton opened this issue Aug 26, 2020 · 0 comments
Open

quoting for scp call #105

bsutton opened this issue Aug 26, 2020 · 0 comments

Comments

@bsutton
Copy link
Collaborator

bsutton commented Aug 26, 2020

I had the following call to scp:

'scp $oldHost:/etc/asterisk/sip.d/* $tmpRoot/'.run;

The call failed as the '*' was being expanded locally and we ended up with a fully qualified path of the form:

`scp /home/me/www.microsoft.com.au:/etc/asterisk/sip.d/* /remote/path'.run.

I got around this problem by quote the local path:

'scp $oldHost:"/etc/asterisk/sip.d/*" $tmpRoot/'.run;

However this dones't feel right.

Maybe we need to reconigize the presense of the ':' or perhaps any other non-path character and then do the expansion.

Of course in this case any expansion of the '*' is wrong (as its meant to be a path on the remote system).

We need to have a look at how bash is handling this situation and provide an equivalent implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant