Hi there,

i dont know if this is exactly the right place to put this, but see for
yourself.

I was missing the "line" command on my linux boxes, which is often used
by shell scripts.

I dont know if it is available somewhere on the net, but this tiny
program works for me.

line.c:


#include <stdio.h>

int main(void)
{
  int c;

  setvbuf(stdin, (char *)NULL, _IONBF, 0);

  while(((c=fgetc(stdin))!='\n')&&(c!=EOF)) fputc(c,stdout);
  fputc('\n',stdout);


  if (c==EOF)
    return(1);
  else
    return(0);
}



Best Regards,

Willi Zimmermann

Reply via email to