2
plink [email protected] -t '/home/user/test/testpgm'
我可以使用上述plink cmd從windows計算機上運行駐留在Linux機器上的下面的程序。Plink傳遞參數
#include<stdio.h>
int main(int argc,char *argv[])
{
int i;
char buf[30];
printf("Test Pgm \n");
printf("No of Arguments=%d\n",argc);
printf("Enter a string:");
fflush(stdout);
gets(buf);
printf("Input str:%s \n",buf);
return 0;
}
gcc test.c -o testpgm
問題:如何將命令行參數傳遞給此函數? 我試圖
plink [email protected] -t '/home/user/test/testpgm arg1'
bash: /home/user/test/testpgm arg1: No such file or directory
謝謝。有用。 – m4n07