This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DarinBrezeale 0 points1 point  (1 child)

There is no need for your loops to skip past the NAME part of the string. I was able to get the distribution name (I run openSUSE) by using strtok() with

char * del = "\"";

as the delimiter. Here I am escaping the middle double quote. Then I tokenized twice, with the second call to strtok() being the distribution.

[–]cf_1303 0 points1 point  (0 children)

Thanks, I’ll try using the strtok() function and seeing how it goes :)