#!/usr/bin/perl use strict; my $server; my $usrallow = "/etc/opt/quest/vas/users.allow"; my @ssh; my $line; foreach $server(@ARGV) { print "getting cgrpfile from $server\n"; @ssh = `ssh $server /bin/cat $usrallow `; foreach $line (@ssh) { if ($line =~ /line/../\\Z/) { print $line; } } } #### getting cgrpfile from x.x.x.5 customizations must be after this line. customgrp1 customgrp2 customgrp3 getting cgrpfile from x.x.x.6 #START: Core Groups defaultgrp1 defaultgrp2 defaultgrp3 defaultgrp4 defaultgrp5 defaultgrp6 customizations must be after this line customgrp1 customgrp7 customgrp8 getting cgrpfile from x.x.x.7 #START: Core Groups defaultgrp1 defaultgrp2 defaultgrp3 defaultgrp4 defaultgrp5 defaultgrp6 customizations must be after this line customgrp5 customgrp12 customgrp10