Skip to content

Commit

Permalink
Merge pull request #3 from waratuman/master
Browse files Browse the repository at this point in the history
Split on newlines
  • Loading branch information
malomalo committed Feb 15, 2014
2 parents ff2673d + 9044b45 commit a4e5367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sync-accounts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def read_permissions(url)
end

def system_users
users = `cat /etc/passwd | grep -v root | grep '/bin/bash'`.split.map do |u|
users = `cat /etc/passwd | grep -v root | grep '/bin/bash'`.split("\n").map do |u|
u =~ /([^\s]+):.*:.*:.*:.*:([^\s]+):\/bin\/bash$/
{:name => $1, :home => $2}
end
Expand All @@ -48,7 +48,7 @@ def system_users
end

def system_apps
users = `cat /etc/passwd | grep -v root | grep '/bin/bash'`.split.map do |u|
users = `cat /etc/passwd | grep -v root | grep '/bin/bash'`.split("\n").map do |u|
u =~ /([^\s]+):.*:.*:.*:.*:([^\s]+):\/bin\/bash$/
{:name => $1, :home => $2}
end
Expand Down

0 comments on commit a4e5367

Please sign in to comment.