<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: The usage of function system() in UNIX in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051922#M96479</link>
    <description>&amp;gt;I am talking about normal C&lt;BR /&gt;&lt;BR /&gt;Then you need to look into popen(3). That provides you with:&lt;BR /&gt;popen() creates a pipe between the calling program and a command to be executed by the POSIX shell&lt;BR /&gt;&lt;BR /&gt;Then you just do fgets on the output.</description>
    <pubDate>Fri, 08 Jun 2007 05:21:01 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2007-06-08T05:21:01Z</dc:date>
    <item>
      <title>The usage of function system() in UNIX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051918#M96475</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;   I dont kn ow this is is the right place to put this query. But, it will help me a lot if i can get the answer from any one of you.&lt;BR /&gt;&lt;BR /&gt;    Question is the system() builin function returns the integer value. But, i want to store the result of the command executed &lt;BR /&gt; ex- system("pwd"); in a string variable.&lt;BR /&gt;        How can i achieve this?&lt;BR /&gt;&lt;BR /&gt;thanks in advance &lt;BR /&gt;Vikram&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Jun 2007 23:57:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051918#M96475</guid>
      <dc:creator>CA1490051</dc:creator>
      <dc:date>2007-06-07T23:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: The usage of function system() in UNIX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051919#M96476</link>
      <description>Are you talking about system() in a C&lt;BR /&gt;program, or in a perl script, or where?</description>
      <pubDate>Fri, 08 Jun 2007 00:46:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051919#M96476</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-06-08T00:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: The usage of function system() in UNIX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051920#M96477</link>
      <description>If this is a libc function, you must redirect stdout (system("pwd &amp;gt; file").  Or you can call popen(3).  Or you should call getcwd(2)&lt;BR /&gt;&lt;BR /&gt;If this is awk, you should pass PWD in its command line.</description>
      <pubDate>Fri, 08 Jun 2007 01:23:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051920#M96477</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-06-08T01:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: The usage of function system() in UNIX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051921#M96478</link>
      <description>Yes, I am talking about normal C- lib function.&lt;BR /&gt;&lt;BR /&gt;  Not any scripts.&lt;BR /&gt;&lt;BR /&gt;thanks and regards&lt;BR /&gt;Vikram</description>
      <pubDate>Fri, 08 Jun 2007 05:16:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051921#M96478</guid>
      <dc:creator>CA1490051</dc:creator>
      <dc:date>2007-06-08T05:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: The usage of function system() in UNIX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051922#M96479</link>
      <description>&amp;gt;I am talking about normal C&lt;BR /&gt;&lt;BR /&gt;Then you need to look into popen(3). That provides you with:&lt;BR /&gt;popen() creates a pipe between the calling program and a command to be executed by the POSIX shell&lt;BR /&gt;&lt;BR /&gt;Then you just do fgets on the output.</description>
      <pubDate>Fri, 08 Jun 2007 05:21:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051922#M96479</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-06-08T05:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: The usage of function system() in UNIX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051923#M96480</link>
      <description>... and when you use popen(), you should also capture the return value of pclose() because that will return the exit status of the popen()'ed command --- equivalent to the value returned by system().</description>
      <pubDate>Fri, 08 Jun 2007 09:37:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051923#M96480</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-06-08T09:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: The usage of function system() in UNIX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051924#M96481</link>
      <description>Check out the URL below for stuff relevant to your post:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.opengroup.org/onlinepubs/009695399/functions/popen.html" target="_blank"&gt;http://www.opengroup.org/onlinepubs/009695399/functions/popen.html&lt;/A&gt;</description>
      <pubDate>Fri, 08 Jun 2007 10:21:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051924#M96481</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-06-08T10:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: The usage of function system() in UNIX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051925#M96482</link>
      <description>in case this C program does very trivial stuff, i highly recommend writing this is perl...</description>
      <pubDate>Mon, 11 Jun 2007 07:02:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051925#M96482</guid>
      <dc:creator>dirk dierickx</dc:creator>
      <dc:date>2007-06-11T07:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: The usage of function system() in UNIX</title>
      <link>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051926#M96483</link>
      <description>I have found the right solution for this by support of all of you.&lt;BR /&gt;&lt;BR /&gt;thnaks and regards&lt;BR /&gt;Vikram</description>
      <pubDate>Mon, 11 Jun 2007 07:37:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/the-usage-of-function-system-in-unix/m-p/5051926#M96483</guid>
      <dc:creator>CA1490051</dc:creator>
      <dc:date>2007-06-11T07:37:05Z</dc:date>
    </item>
  </channel>
</rss>

