linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* command output to variables
@ 2009-01-07 12:35 Jai Sharma
  2009-01-07 12:54 ` Xin Zou
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jai Sharma @ 2009-01-07 12:35 UTC (permalink / raw)
  To: linux-c-programming

Hi All

I m PHP, Perl programmer , but finally I need C to program in LInux.
In perl I simply use `` operator to get command output.

$who_output = `who` ;


but in C , how can i get the output. Using system function i m easily
run the command. But how to get its output .

system("who");

Plz help

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-10 14:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 12:35 command output to variables Jai Sharma
2009-01-07 12:54 ` Xin Zou
2009-01-07 13:33 ` Michele Mondelli
2009-01-07 14:59   ` Jai Sharma
2009-01-10 14:57   ` Jason
2009-01-07 14:31 ` Bert Wesarg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).