note
diotalevi
<p>Hi, you could solve this in perl alone but this is also a practical use for parallel-ssh with a snip of perl to make your report.</p>
<c>apt install pssh
parallel-ssh -h HOSTNAMES_TXT -o /tmp/users 'cut -d: -f1 /etc/passwd'
perl -le '
for my $file (@ARGV) {
my ($host) = $file =~ m{/([^/]+)$};
open my($fh), $file
or die "Error opening $file: $!";
my @users = <$fh>;
chomp @users;
print join(",", $host, @users) . "\n";
}
' /tmp/users/*</c>
<div class="pmsig"><div class="pmsig-194920">
<p>⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊</p>
</div></div>
1212808
1212808