I'm opening the /proc/hostname file and reading in the string in that file. But I need to use that string and then append other stuff after it later, but it appears as though there is an newline character after the string. here's my code:
and if you do a printf directly after that, it prints what is in lineBuf and then go to the next line!? anyone?Code:fp = fopen("/thefile", "r"); fgets(lineBuf, count, fp); fclose(fp);