#include <stdio.h>
#include <unistd.h>
#include <termios.h>

int main()
{
 struct termios term;
 int c;

 if((tcgetattr(STDIN_FILENO, &term)) <0)
   {
     printf("Fehler bei tcgetattr.......\n");
     exit(0);
   }

 term.c_cc[VEOF] = 27; /*ASCII-Code 27 = ESC == EOF*/

 if((tcsetattr(STDIN_FILENO, TCSAFLUSH, &term)) <0)
  {
     printf("Fehler bei tcsetattr........\n");
     exit(1);
   }

 while((c=getchar()) != EOF)
     putchar(c);

 return 0;
}
