LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[Fwd: [CLUG] PPP statistics]

[Fwd: [CLUG] PPP statistics]

Donncha O Caoimh donncha.ocaoimh at tradesignals.com
Mon Sep 10 10:03:15 IST 2001


(I think you meant to mail the list?)

Robert Heffernan wrote:
> 
> This one works ok:
>   pppstats | sed 1d | awk '{print $1" "$7"\n"}'
> the sed bit strips the line that contains the heards (such as 'IN', 'OUT'
> etc.) from it
> 
> I have another short question.  Is there a way to stick the output of said
> command into a variable and then return the said variable to the child
> process of the srript.
> 
> I'm actually running this script from a C program (using system()).  The
> only thing I can think of at the moment is using
>   pppstats | sed 1d | awk '{print $1" "$7"\n"}' > somefile
> and then in the C proggy, after running the script snarf the contents of
> somefile and deal with it.
> I fear this might create a lot of disk activity if I had the C prog doing
> this regularily (i.e. - almost constantly)
> 
> is there a better way?
> 
> thanks again
> 
> bob




More information about the Cork mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell