plink user@10.220.60.xx'/ home / user / test / testpgm'
plinkを使用してWindowsマシンからLinuxマシンに常駐する以下のプログラムを実行すると、次のメッセージのみが表示されます。
Pgmをテストする 文字列を入力してください:
文字列を入力として入力すると、コマンドウィンドウに表示されず、出力も表示されません。
#include<stdio.h>
int main(void)
{
int i;
char buf[30];
printf("Test Pgm \n");
printf("Enter a string:");
fflush(stdout);
gets(buf);
printf("Input str:%s \n",buf);
return 0;
}
gcc test.c -o testpgm
PS:Plink(PuTTY Link)は、UNIXsshに似たコマンドライン接続ツールです。