Path: utzoo!attcan!uunet!sco!chapman From: chapman@sco.COM (Brian Chapman) Newsgroups: comp.unix.internals Subject: Re: System() function Message-ID: <8419@scolex.sco.COM> Date: 26 Oct 90 04:34:52 GMT References: <24826@adm.BRL.MIL> Sender: news@sco.COM Lines: 17 vilva@csvax.csc.lsu.edu (Vilva Natarajan) writes: >I am trying to do system("man cat | wc -c") in my program, and i need >to store the value returned by "wc" in a variable declared in my program. >I dont want to redirect it to a file and then read from the file. >Please advice. Try looking in to popen() rater than system(). popen() is the same thing except you get pipes to and from the command. -- Brian Chapman uunet!sco!chapman Pay no attention to the man behind the curtain!