C
Cal Lidderdale
My input line is i1,i2,i3,i4,i5,i6,i7,i8^,...i596,597, ...
14101,14102...NL/CR
very long line of data - I only want the first 8 items and
the delimiter between 8 & 9 is a carrot "^".
The line can end at the 100th item or the 40,000th item.
My code is:
char data[500], mynull[800000];
n1 = fscanf (fp, "%[^^]^%[^\n]\n", &data, mynull);
what I'd like is
fscanf (fp, "%[^^]^%[^\n]\n", &data, >/dev/null);
well you get the point.
Seems like there could be a cleaner way to send every
thing between the "^" & "\n" to the bit bucket so all I
get is 1-8, 1-8, 1-8 with all the 9-\n > null.
Thanks
14101,14102...NL/CR
very long line of data - I only want the first 8 items and
the delimiter between 8 & 9 is a carrot "^".
The line can end at the 100th item or the 40,000th item.
My code is:
char data[500], mynull[800000];
n1 = fscanf (fp, "%[^^]^%[^\n]\n", &data, mynull);
what I'd like is
fscanf (fp, "%[^^]^%[^\n]\n", &data, >/dev/null);
well you get the point.
Seems like there could be a cleaner way to send every
thing between the "^" & "\n" to the bit bucket so all I
get is 1-8, 1-8, 1-8 with all the 9-\n > null.
Thanks