bash - Escape whole find content to send it to a command over ssh -
i'm trying utilize ssh command :
ssh user@host command -m myfile myfile content of file on local directory.
i'm using bash. i've tried utilize printf "%q", i'd not working. myfile contains spaces, new lines, single , doublequotes...
is there way command gets file content ? can't run else command on remote host.
how first transferring file remote machine
scp myfile user@host:myfile && ssh user@host 'command -m "$(< myfile)" && rm myfile' bash ssh escaping
No comments:
Post a Comment