in reply to Searching in remote files over SSH
Are the files small? If so, I'd try loading them into memory before your loop through File1 - especially if you're going to do repeated searches:
Then you can use the grep internal function to look for what you want.my @file21 = `ssh host2-1 "cat File2-1"`; my @file22 = `ssh host2-2 "cat File2-2"`;
(This is one of the few times I would use the backticks for running programs...)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Searching in remote files over SSH
by sitnalta (Initiate) on Nov 21, 2006 at 22:14 UTC | |
by Tanktalus (Canon) on Nov 21, 2006 at 22:34 UTC |