print or put output of CMD like ls into an array
The last response to this question was 8 years old.
Is there anything new? Thanks in advance. |
int main( int argc, char *argv[])
{ char array[1024]; FILE *fp = popen("ls", "r"); array= fgets(array, sizeof(buffer), fp); pclose(fp); } |
What environment are you talking about here, shell scripting or some programming language? And why should you think anything important has changed about it in 8 years? Why didn't you link to the thread you're referring to?
In other words, how about giving us some background so we can understand why you asked the question? In any case, I see at least two threads more recent than that in the "similar threads" box at the bottom of the page that seem to fit the topic here. |
All times are GMT -5. The time now is 01:19 AM. |