Accessing utmp/wtmp in Ruby 
Author Message
 Accessing utmp/wtmp in Ruby

Please be gentle, if this is a stupd or often
asked question, I am just starting my first
steps in Ruby.

Is there a way to get the logged in users on
a unix host in Ruby, and their Displays? In
Perl there is Sys::Utmp, which does the job
nicely. Is there something similar for Ruby?

TIA
/ralph



Thu, 17 Nov 2005 00:54:06 GMT  
 Accessing utmp/wtmp in Ruby

Quote:

> Please be gentle, if this is a stupd or often
> asked question, I am just starting my first
> steps in Ruby.

> Is there a way to get the logged in users on
> a unix host in Ruby, and their Displays? In
> Perl there is Sys::Utmp, which does the job
> nicely. Is there something similar for Ruby?

`who`.each { |w| p w }

puts `who`

There's probably more ways than that, but I'm new here too :)

--

Cedar Rapids, Iowa       http://homepage.mac.com/dcoshel
``I think most pleasantly in metaphors, and smoking brings metaphors to
mind." - Augustus Srb, in Alexei Panshin's  _Star Well_



Thu, 17 Nov 2005 02:19:16 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. finger pts wtmp utmp

2. wtmp

3. How do I read utmp ??

4. How to read /etc/utmp using tcl??

5. Accessing Ruby class from C extention

6. cvs.ruby-lang.org access

7. ruby http access to apache

8. Anonymous CVS access to cvs.ruby-lang.org

9. ODBC database access from Ruby

10. Ruby on Port 23 without admin access

11. Accessing C structure members from Ruby

12. pthread trouble with ruby-opengl on FreeBSD (was: Re: [announcement] Ruby 3D Ruby)

 

 
Powered by phpBB® Forum Software