home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
oslite11.zip
/
skip.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-09-05
|
402b
|
26 lines
#include <stdio.h>
#include <stdlib.h>
void main (int argc, char **argv)
{
int c, in;
if (argc < 2) exit (5);
c = atoi (argv[1]);
_fsetmode (stdin, "b");
_fsetmode (stdout, "b");
while (!feof (stdin))
{
in = fgetc (stdin);
if (!feof (stdin))
{
if (!c) fputc (in, stdout);
else if ((c)&&(in=='\n'))
{
c--;
}
}
}
}