Created
November 27, 2010 00:07
-
-
Save rockpapergoat/717380 to your computer and use it in GitHub Desktop.
another try, declaring only one variable instead of three
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -wKU | |
def iterate_users | |
userlist=`/usr/bin/dscl . -list /users UniqueID`.split("\n").map { |pair| pair.split(" ").to_a }.find_all { |item| item.at(1).to_i > 500 } | |
p userlist | |
end | |
iterate_users |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment