sitnalta has asked for the wisdom of the Perl Monks concerning the following question:
This is what I have so far, that only prints info i want in File1, I have no idea where to go from here to print info from two different files to the terminal screen. This info is probley pointless for me to post here but oh well.my @whatever01=system('ssh somehost "grep $commonnumber File2-2"');
#!/usr/bin/perl -w use strict; open(File1, "File1"); while (<File1>) { if (/@ARGV/) { my @atlmmg01=split(/:/); my $commonnumber=@atlmmg01[17]; print "----------------------------------------------- +---------- ----\n"; print "@atlmmg01[2]\n"; print "@atlmmg01[17,18]\n"; print "@atlmmg01[26]\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Searching in remote files over SSH
by Tanktalus (Canon) on Nov 21, 2006 at 21:56 UTC | |
by sitnalta (Initiate) on Nov 21, 2006 at 22:14 UTC | |
by Tanktalus (Canon) on Nov 21, 2006 at 22:34 UTC |