5 * This program take a text separated by new line
6 * and extract specific paragraphs from that
8 int main(int argc
,char **argv
)
14 if (sscanf(argv
[1],"%d",&from
) != 1) {
15 fprintf(stderr
,"Invalid parameter (from): %s\n",argv
[1]);
19 if (sscanf(argv
[2],"%d",&to
) != 1) {
20 fprintf(stderr
,"Invalid parameter (to): %s\n",argv
[2]);
28 fprintf(stderr
,"Syntax: pf <from> [<to>]\n");
33 while (fgets(buf
,1025, stdin
) && i
<= to
) {