I’m doing a bash query using subprocess over SSH (don’t ask). The query includes using find with the -exec option, however, on the remote target host, {} won’t expand properly, when viewing what the query actually does on the target host.
For example: find / -name "hello.txt" -exec echo {} \; where {} should read hello.txt but it merely reads just as {}.
So, what I’m I missing here?
Thanks in advance.
It would be helpful if you posted some code, but my guess is that you are not including
shell=Truein your subprocess arguments, which is necessary for the variable expansion. For example: