Displaying 1 result from an estimated 1 matches for "ex_local".
Did you mean:
ei_local
2013 Apr 20
3
[Bug 2094] New: Executing commands via ssh on a remote host has different parameter passing properties
...Component: ssh
Assignee: unassigned-bugs at mindrot.org
Reporter: laurie at tratt.net
Consider the file /tmp/ap.sh which simply prints out all the arguments
to it:
#! /bin/sh
while [ $# -ge 1 ]; do
echo "arg: $1"
shift
done
If I create a C file ex_local.c:
#include <unistd.h>
int main(int argc, char** argv) {
execlp(argv[1], argv[1], "a", "a'b", NULL);
return 0;
}
and then compile and run it, the arguments passed to it are printed
out:
$ ex_local /tmp/ap.sh
a
a'b
$
which is correct....