Skip to content

Instantly share code, notes, and snippets.

@glarizza
Created January 12, 2012 05:25
Show Gist options
  • Select an option

  • Save glarizza/1598939 to your computer and use it in GitHub Desktop.

Select an option

Save glarizza/1598939 to your computer and use it in GitHub Desktop.
Getting Users
users = %x{ps aux 2> /dev/null | grep [l]oginwindow | cut -d " " -f1}.split
puts (users - ['root']).join(",")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment