Hacker News .hn
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nneonneo
on July 14, 2023
|
parent
|
context
|
favorite
| on:
OpenSSH has some peculiar handling around command ...
If you
do
need single quotes in the inner command, you can use the "'" trick:
ssh host -- ls "'"'folder$name'"'"
me-vs-cat
on July 15, 2023
[–]
$name will never be expanded. Is that what you expected?
nneonneo
on July 15, 2023
|
parent
[–]
Yes, that’s the intent: using single quotes at both levels will prevent either your shell or the remote shell from expanding the name, so you can interact with a file name containing a literal $.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: