R
robbie carlton
I understand that c was originally designed to write and communicate
with the unix operating system. Until recently I ignored this, as I
was mostly polaying with opengl. I am now interested in interacting
more directly with the operating system (actually linux) and I was
wondering if anyone has any advice/urls. Specifically, I've found the
system() function, which almost does what I want. But, while I could
do something like
system("cd /me/home/somedir");
system("mkdir somesubdir");
which is cool. But what if I want to get information /from/ the OS?
say I just want to get the output of a ls command. Do I have to do it
all with system() calls and environment variables? If so, I may as
well write a shell script.
Anyhoo, ta.
with the unix operating system. Until recently I ignored this, as I
was mostly polaying with opengl. I am now interested in interacting
more directly with the operating system (actually linux) and I was
wondering if anyone has any advice/urls. Specifically, I've found the
system() function, which almost does what I want. But, while I could
do something like
system("cd /me/home/somedir");
system("mkdir somesubdir");
which is cool. But what if I want to get information /from/ the OS?
say I just want to get the output of a ls command. Do I have to do it
all with system() calls and environment variables? If so, I may as
well write a shell script.
Anyhoo, ta.